Behavior of long isn't unified across various execution environment. We cannot expect it is always represented as a number. release-1.3
authorJaroslav Tulach <jtulach@netbeans.org>
Tue, 01 Mar 2016 18:07:55 +0100
branchrelease-1.3
changeset 1072807ddf523941
parent 1071 75bb294f5384
child 1073 076297c6bca3
Behavior of long isn't unified across various execution environment. We cannot expect it is always represented as a number.
json-tck/src/main/java/net/java/html/json/tests/KnockoutTest.java
     1.1 --- a/json-tck/src/main/java/net/java/html/json/tests/KnockoutTest.java	Tue Mar 01 04:31:55 2016 +0100
     1.2 +++ b/json-tck/src/main/java/net/java/html/json/tests/KnockoutTest.java	Tue Mar 01 18:07:55 2016 +0100
     1.3 @@ -409,7 +409,6 @@
     1.4  
     1.5      @Model(className = "ConstantModel", targetId = "", builder = "assign", properties = {
     1.6          @Property(name = "doubleValue", mutable = false, type = double.class),
     1.7 -        @Property(name = "longValue", mutable = false, type = long.class),
     1.8          @Property(name = "stringValue", mutable = false, type = String.class),
     1.9          @Property(name = "boolValue", mutable = false, type = boolean.class),
    1.10          @Property(name = "intArray", mutable = false, type = int.class, array = true),
    1.11 @@ -462,28 +461,13 @@
    1.12          Utils.exposeHTML(KnockoutTest.class, "");
    1.13      }
    1.14  
    1.15 -    @KOTest public void nonMutableLong() throws Exception {
    1.16 -        Utils.exposeHTML(KnockoutTest.class,
    1.17 -            "Type: <input id='input' data-bind=\"value: typeof longValue\"></input>\n"
    1.18 -        );
    1.19 -
    1.20 -        ConstantModel model = Models.bind(new ConstantModel(), newContext());
    1.21 -        model.assignStringValue("Hello").assignLongValue(Long.MAX_VALUE);
    1.22 -        model.applyBindings();
    1.23 -
    1.24 -        String v = getSetInput("input", null);
    1.25 -        assertEquals(v, "number", "Right type found: " + v);
    1.26 -
    1.27 -        Utils.exposeHTML(KnockoutTest.class, "");
    1.28 -    }
    1.29 -
    1.30      @KOTest public void nonMutableIntArray() throws Exception {
    1.31          Utils.exposeHTML(KnockoutTest.class,
    1.32              "Type: <input id='input' data-bind=\"value: typeof intArray\"></input>\n"
    1.33          );
    1.34  
    1.35          ConstantModel model = Models.bind(new ConstantModel(), newContext());
    1.36 -        model.assignStringValue("Hello").assignLongValue(Long.MAX_VALUE).assignIntArray(1, 2, 3, 4);
    1.37 +        model.assignStringValue("Hello").assignDoubleValue(Long.MAX_VALUE).assignIntArray(1, 2, 3, 4);
    1.38          model.applyBindings();
    1.39  
    1.40          String v = getSetInput("input", null);