Forráskód Böngészése

UNPACK -> UNPK (according to language repot). Fix Issue #44.

Vladislav Folts 11 éve
szülő
commit
917405eacd

+ 1 - 1
src/procedure.js

@@ -562,7 +562,7 @@ exports.predefined = [
                    "; " +
                    op.divInplace(x, op.pow2(y));
         }
-        var name = "UNPACK";
+        var name = "UNPK";
         var proc = new Std(
             name,
             args,

+ 0 - 0
test/expected/pack_unpack.js → test/expected/pack_unpk.js


+ 2 - 2
test/input/pack_unpack.ob → test/input/pack_unpk.ob

@@ -5,10 +5,10 @@ VAR i: INTEGER; r: REAL;
 PROCEDURE p(VAR r: REAL; VAR i: INTEGER);
 BEGIN
     PACK(r, i);
-    UNPACK(r, i);
+    UNPK(r, i);
 END p;
 
 BEGIN
     PACK(r, i);
-    UNPACK(r, i);
+    UNPK(r, i);
 END m.

+ 1 - 1
test/input/run/pack_unpack.ob → test/input/run/pack_unpk.ob

@@ -9,7 +9,7 @@ BEGIN
     ASSERT(r = 1.23 * FLT(LSL(1, i)));
 
     i := 0;
-    UNPACK(r, i);
+    UNPK(r, i);
     ASSERT(r = 1.23);
     ASSERT(i = 7);
 END m.

+ 5 - 5
test/test_unit.js

@@ -435,12 +435,12 @@ return {
          "PACK(r, 3)"),
     fail(["PACK(r, r)", "type mismatch for argument 2: 'REAL' cannot be converted to 'INTEGER'"])
 ),
-"UNPACK": testWithContext(
+"UNPK": testWithContext(
     context(grammar.statement, "VAR r: REAL; i: INTEGER;"),
-    pass("UNPACK(r, i)"),
-    fail(["UNPACK(r, r)", "type mismatch for argument 2: 'REAL' cannot be converted to 'INTEGER'"],
-         ["UNPACK(r, 3)", "expression cannot be used as VAR parameter"],
-         ["UNPACK(123.456, i)", "expression cannot be used as VAR parameter"]
+    pass("UNPK(r, i)"),
+    fail(["UNPK(r, r)", "type mismatch for argument 2: 'REAL' cannot be converted to 'INTEGER'"],
+         ["UNPK(r, 3)", "expression cannot be used as VAR parameter"],
+         ["UNPK(123.456, i)", "expression cannot be used as VAR parameter"]
          )
 ),
 "standard procedure cannot be referenced" : testWithContext(