Пример #1
0
 @Test
 public void undefinedNotEqu() {
   ValueTable table = new ValueTable();
   table.storeValue("hasHouse", new UndefValue());
   UndefValue v = TestHelper.as(TestHelper.evaluate("1!=hasHouse!=2", table), UndefValue.class);
   assertNotNull(v);
 }
Пример #2
0
 @Test
 public void equStringTrue() {
   BoolValue v =
       TestHelper.as(TestHelper.evaluate("\"string\"==\"string\"", null), BoolValue.class);
   assertNotNull(v);
   assertTrue(v.getValue());
 }
Пример #3
0
 @Test
 public void notEquStringFalse() {
   BoolValue v =
       TestHelper.as(TestHelper.evaluate("\"string\"!=\"string\"", null), BoolValue.class);
   assertNotNull(v);
   assertFalse(v.getValue());
 }
Пример #4
0
 @Test
 public void gtEquDecTrue() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("1.1>=1.0", null), BoolValue.class);
   assertNotNull(v);
   assertTrue(v.getValue());
 }
Пример #5
0
 @Test
 public void ltEquIntFalse() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("3<=1", null), BoolValue.class);
   assertNotNull(v);
   assertFalse(v.getValue());
 }
Пример #6
0
 @Test
 public void ltIntTrue() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("1<3", null), BoolValue.class);
   assertNotNull(v);
   assertTrue(v.getValue());
 }
Пример #7
0
 @Test
 public void ltDecFalse() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("1.0<1.0", null), BoolValue.class);
   assertNotNull(v);
   assertFalse(v.getValue());
 }
Пример #8
0
 @Test
 public void equBoolFalse() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("true==false", null), BoolValue.class);
   assertNotNull(v);
   assertFalse(v.getValue());
 }
Пример #9
0
 @Test
 public void notEquBoolTrue() {
   BoolValue v = TestHelper.as(TestHelper.evaluate("true!=false", null), BoolValue.class);
   assertNotNull(v);
   assertTrue(v.getValue());
 }