Browse Source

Low-level API test suite inherited from DOMite.

Herbert Vojčík 9 years ago
parent
commit
e1113025db
3 changed files with 34 additions and 2 deletions
  1. 1 1
      bower.json
  2. 23 1
      src/Silk-Tests.js
  3. 10 0
      src/Silk-Tests.st

+ 1 - 1
bower.json

@@ -28,7 +28,7 @@
   "private": false,
   "dependencies": {
     "amber": ">=0.14.12",
-    "domite": "^0.2.2"
+    "domite": "^0.2.4"
   },
   "devDependencies": {
     "amber-ide-starter-dialog": "^0.1.0",

+ 23 - 1
src/Silk-Tests.js

@@ -1,9 +1,31 @@
-define("silk/Silk-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
+define("silk/Silk-Tests", ["amber/boot", "amber_core/SUnit", "domite/DOMite-Tests"], function($boot){
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Silk-Tests');
 $core.packages["Silk-Tests"].innerEval = function (expr) { return eval(expr); };
 $core.packages["Silk-Tests"].transport = {"type":"amd","amdNamespace":"silk"};
 
+$core.addClass('SilkInheritedTest', $globals.DOMiteTest, [], 'Silk-Tests');
+$core.addMethod(
+$core.method({
+selector: "testedClass",
+protocol: 'fixture',
+fn: function (){
+var self=this;
+function $Silk(){return $globals.Silk||(typeof Silk=="undefined"?nil:Silk)}
+return $Silk();
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testedClass\x0a\x09^ Silk",
+referencedClasses: ["Silk"],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.SilkInheritedTest);
+
+
+
 $core.addClass('SilkTest', $globals.TestCase, [], 'Silk-Tests');
 
 });

+ 10 - 0
src/Silk-Tests.st

@@ -1,4 +1,14 @@
 Smalltalk createPackage: 'Silk-Tests'!
+DOMiteTest subclass: #SilkInheritedTest
+	instanceVariableNames: ''
+	package: 'Silk-Tests'!
+
+!SilkInheritedTest methodsFor: 'fixture'!
+
+testedClass
+	^ Silk
+! !
+
 TestCase subclass: #SilkTest
 	instanceVariableNames: ''
 	package: 'Silk-Tests'!