Package heart.xtt

Examples of heart.xtt.Type


  @Test
  public void testNotInValueIsNotInTheDomain() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    Value value = new SimpleNumeric(15.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric));
    exception.expect(NotInTheDomainException.class);
    exception.expectMessage(getNotInTheDomainMessage(value));

    simpleNumeric.notin(value, type);
  }
View Full Code Here


  @Test
  public void testMulValueIsNotInTheDomain() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    Value value = new SimpleNumeric(15.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric));
    exception.expect(NotInTheDomainException.class);
    exception.expectMessage(getNotInTheDomainMessage(value));

    simpleNumeric.mul(value, type);
  }
View Full Code Here

  @Test
  public void testAddValueIsNotInTheDomain() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    Value value = new SimpleNumeric(15.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric));
    exception.expect(NotInTheDomainException.class);
    exception.expectMessage(getNotInTheDomainMessage(value));

    simpleNumeric.add(value, type);
  }
View Full Code Here

  @Test
  public void testSubValueIsNotInTheDomain() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    Value value = new SimpleNumeric(15.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric));
    exception.expect(NotInTheDomainException.class);
    exception.expectMessage(getNotInTheDomainMessage(value));

    simpleNumeric.sub(value, type);
  }
View Full Code Here

  @Test
  public void testDivValueIsNotInTheDomain() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    Value value = new SimpleNumeric(15.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric));
    exception.expect(NotInTheDomainException.class);
    exception.expectMessage(getNotInTheDomainMessage(value));

    simpleNumeric.div(value, type);
  }
View Full Code Here

  @Test
  public void testEqWithSimpleSymbolicValue() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    SimpleSymbolic simpleSymbolic = new SimpleSymbolic("value", null);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        simpleSymbolic));
    try {
      simpleNumeric.eq(simpleSymbolic, type);
      fail();
    } catch (NotInTheDomainException e) {
View Full Code Here

    SimpleSymbolic value = new SimpleSymbolic("value", 1);
    SimpleSymbolic value2 = new SimpleSymbolic("value 2", 11);
    SimpleNumeric value3 = new SimpleNumeric(10.0);
    SimpleNumeric value4 = new SimpleNumeric(15.0);
    SimpleSymbolic value5 = new SimpleSymbolic("value 5", 15);
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        simpleSymbolic, value, value2, value3, value4, value5));
   
    assertTrue(simpleSymbolic.eq(value, type));
    assertFalse(simpleSymbolic.neq(value, type));
    assertFalse(simpleSymbolic.eq(value2, type));
View Full Code Here

    SimpleNumeric value3 = new SimpleNumeric(15.0);
    SimpleSymbolic value4 = new SimpleSymbolic("val4", 5);
    SimpleSymbolic value5 = new SimpleSymbolic("val5", 10);
    SimpleSymbolic value6 = new SimpleSymbolic("val6", 15);
   
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        simpleSymbolic, value, value2, value3, value4, value5, value6));
   
    assertTrue(simpleSymbolic.gt(value, type));
    assertTrue(simpleSymbolic.gt(value4, type));
    assertFalse(simpleSymbolic.gt(value2, type));
View Full Code Here

    Range rangeValue1 = new Range(value4, value5);
    Range rangeValue2 = new Range(value4, value6);
    Range rangeValue3 = new Range(new SimpleNumeric(5.0), new SimpleNumeric(15.0));
    Range rangeValue4 = new Range(new SimpleNumeric(5.0), new SimpleNumeric(9.0));
   
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        simpleSymbolic, setValue1, setValue2, value, value2, value3,
        value4, value5, value6, rangeValue1,
        rangeValue2, rangeValue3, rangeValue4));
   
    assertTrue(simpleSymbolic.in(setValue1, type));
View Full Code Here

 
  @Test
  public void testEqAndNeqLogic() throws BuilderException, UnsupportedOperationException, NotInTheDomainException, RangeFormatException{
    Range value = new Range(new SimpleNumeric(5.0), new SimpleNumeric(10.0));
    Range value2 = new Range(new SimpleNumeric(15.0), new SimpleNumeric(20.0));
    Type type = createTypeWithDomain(Arrays.<Value>asList(range, value, value2));
   
    assertTrue(range.eq(value, type));
    assertFalse(range.neq(value, type));
    value.setLeftInclusive(false);
    assertFalse(range.eq(value, type));
View Full Code Here

TOP

Related Classes of heart.xtt.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.