Package heart.xtt

Examples of heart.xtt.Type


 
  @Test
  public void testSimAndNotSimLogic() throws BuilderException, UnsupportedOperationException, NotInTheDomainException, RangeFormatException{
    Range value = new Range(new SimpleNumeric(4.0), new SimpleNumeric(2.0));
    SetValue value2 = new SetValue(Arrays.<Value> asList(new SimpleNumeric(4.0), new SimpleNumeric(2.0)));
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        setValue, value, value2, new SimpleNumeric(3.0)));
   
    assertFalse(setValue.sim(value, type));
    assertFalse(setValue.sim(value2, type));
    assertTrue(setValue.notsim(value, type));
View Full Code Here


  @Test
  public void testIntersectLogic() throws BuilderException, UnsupportedOperationException, NotInTheDomainException, RangeFormatException{
    List<Value> expectedResult = Arrays.<Value> asList(new SimpleNumeric(4.0), new SimpleNumeric(2.0));
    Range value = new Range(new SimpleNumeric(4.0), new SimpleNumeric(2.0));
    SetValue value2 = new SetValue(expectedResult);
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        setValue, value, value2, new SimpleNumeric(3.0),new SimpleNumeric(5.0)));
    setValue = new SetValue(expectedResult);
    setValue.appendValue(new SimpleNumeric(10.0));
   
    List<Value> result = ((SetValue)setValue.intersect(value2, type)).getValues();
View Full Code Here

  @Test
  public void testUnionLogic() throws BuilderException, UnsupportedOperationException, NotInTheDomainException, RangeFormatException{
    List<Value> values = Arrays.<Value>asList(new SimpleNumeric(4.0), new SimpleNumeric(2.0));
    Range value = new Range(new SimpleNumeric(4.0), new SimpleNumeric(2.0));
    SetValue value2 = new SetValue(values);
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        setValue, value, value2,new SimpleNumeric(1.0), new SimpleNumeric(5.0)));
   
    List<Value> setValues = Arrays.<Value> asList(new SimpleNumeric(1.0), new SimpleNumeric(5.0));
    setValue = new SetValue(setValues);
    List<Value> expectedResult = new ArrayList<Value>(setValues);
View Full Code Here

    SimpleNumeric value6 = new SimpleNumeric(8.0);
    SetValue value5 = new SetValue(Arrays.<Value> asList(value,value3,value6));
    List<Value> setValues = Arrays.<Value> asList(value, value3,
        value4, new SimpleNumeric(3.0));
    setValue = new SetValue(setValues);
    Type type = createTypeWithDomain(Arrays.<Value> asList(
        setValue, value, value3,value4,value6,new SimpleSymbolic("val",5)));
   
    SetValue result = (SetValue) setValue.except(value, type);   
    assertFalse(result.getValues().contains(value));
    result = (SetValue) setValue.except(value3, type);
View Full Code Here

  @Test
  public void testAllLogicOperationsWithSimpleNumericValue()
      throws BuilderException, UnsupportedOperationException,
      NotInTheDomainException {
    SimpleNumeric value = new SimpleNumeric(10.0);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));

    assertTrue(simpleNumeric.computeLogicalExpresion(value, type,
        LogicOperations.EQ));
    assertTrue(simpleNumeric.eq(value, type));
View Full Code Here

  @Test
  public void testAllLogicOperationsWithSimpleSymbolicValue()
      throws BuilderException, UnsupportedOperationException,
      NotInTheDomainException {
    SimpleSymbolic value = new SimpleSymbolic("value", 10);
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));

    assertTrue(simpleNumeric.computeLogicalExpresion(value, type,
        LogicOperations.EQ));
    assertTrue(simpleNumeric.eq(value, type));
View Full Code Here

  @Test
  public void testGtForNotOrderedSimpleSymbolic() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    SimpleSymbolic value = new SimpleSymbolic("value");
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));
    exception.expect(UnsupportedOperationException.class);
    exception.expectMessage("Numeric " + simpleNumeric
        + " cannot be compared " + LogicOperations.GT + " to symbolic "
        + value + " unless it is ordered");
View Full Code Here

  @Test
  public void testGteForNotOrderedSimpleSymbolic() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    SimpleSymbolic value = new SimpleSymbolic("value");
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));
    exception.expect(UnsupportedOperationException.class);
    exception.expectMessage("Numeric " + simpleNumeric
        + " cannot be compared " + LogicOperations.GTE
        + " to symbolic " + value + " unless it is ordered");
View Full Code Here

  @Test
  public void testLtForNotOrderedSimpleSymbolic() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    SimpleSymbolic value = new SimpleSymbolic("value");
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));
    exception.expect(UnsupportedOperationException.class);
    exception.expectMessage("Numeric " + simpleNumeric
        + " cannot be compared " + LogicOperations.LT + " to symbolic "
        + value + " unless it is ordered");
View Full Code Here

  @Test
  public void testLteForNotOrderedSimpleSymbolic() throws BuilderException,
      UnsupportedOperationException, NotInTheDomainException {
    SimpleSymbolic value = new SimpleSymbolic("value");
    Type type = createTypeWithDomain(Arrays.<Value> asList(simpleNumeric,
        value));
    exception.expect(UnsupportedOperationException.class);
    exception.expectMessage("Numeric " + simpleNumeric
        + " cannot be compared " + LogicOperations.LTE
        + " to symbolic " + value + " unless it is ordered");
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.