OSDN Git Service

Test lazy on the base.js
authordhrname <dhrname@users.sourceforge.jp>
Sat, 10 Jan 2015 14:34:53 +0000 (23:34 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 10 Jan 2015 14:34:53 +0000 (23:34 +0900)
tool/Spec/spec/BaseJSSpec.js

index 0b58418..2271a4a 100644 (file)
@@ -452,6 +452,17 @@ describe("base.js", function() {
           return this.func;\r
         }\r
       } ).call() ).toBe(base("$cfp").$a);\r
+      \r
+      /*遅延評価*/\r
+      base("$bfp").up("$s").of( {\r
+        lazy: {\r
+          a: base("$cfp")\r
+        },\r
+        call: function() {\r
+          return this.lazy.a;\r
+        }\r
+      } );\r
+      expect(base("$bfp").$s.call())toBe(base("$cfp"));\r
     });\r
     \r
     /*無効同値を調べる*/\r