OSDN Git Service

Edit a limit value analysis for the 'of' method
authordhrname <dhrname@users.sourceforge.jp>
Mon, 12 Jan 2015 14:13:36 +0000 (23:13 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 12 Jan 2015 14:13:36 +0000 (23:13 +0900)
tool/Spec/spec/BaseJSSpec.js

index 2271a4a..d3b0293 100644 (file)
@@ -327,10 +327,35 @@ describe("base.js", function() {
         expect(typeof base("$fp").of).toBe("function");\r
         /*メソッドチェーンを作る*/\r
         expect(base("$fp").of({})).toBe(base("$fp"));\r
+\r
         /*同じオブジェクトで再度、ofメソッドを呼び出すことはできない*/\r
         expect(function() {\r
           base("$fp").of({});\r
         }).toThrow("Reset error");\r
+        /*upメソッドで継承したオブジェクトは再度呼び出せる*/\r
+        base("$fp").up().of( {} );\r
+        \r
+        base("$fp").up().of ( {\r
+          a: 0,\r
+          b: 1,\r
+          c: true,\r
+          d: false,\r
+          e: {},\r
+          f: function() {},\r
+          g: [],\r
+          h: null,\r
+          \r
+        } );\r
+        base("$fp").$1.mix( function(_) {\r
+          expect(_.a).toEqual(0);\r
+          expect(_.b).toEqual(1);\r
+          expect(_.c).toBeTrue();\r
+          expect(_.d).toBeFalse();\r
+          expect(typeof _.e).toBe("object");\r
+          expect(typeof _.f).toBe("function");\r
+          expect(_.g.length).toEqual(0);\r
+          expect(_.h).toBeNull();\r
+        } );\r
     });\r
     /*有効同値を調べる*/\r
     it("Equivalence partitioning, the following is the valid partion", function() {\r
@@ -477,10 +502,6 @@ describe("base.js", function() {
         base("$efp").call();\r
       }).toThrow();\r
       } );\r
-      base("$efp").up("$p").of( {\r
-        a: null\r
-      } );\r
-      expect(base("$efp").$p.a).toBeNull();\r
   });\r
 \r
   it("should occur an error, if no arguments", function(){\r