FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest Class Reference

Test suite for JaCopxcspParser. More...

Inheritance diagram for frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest:

Public Member Functions

 JaCopxcspParserTest (String name, String constraintName)
 Generates a test using the specified method.
 JaCopxcspParserTest (String name)
 Generates a test using the specified method.
void testPredicateNotParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with not predicate.
void testPredicateAndParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with and predicate.
void testPredicateOrParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with or predicate.
void testPredicateXorParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with xor predicate.
void testPredicateIffParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with iff predicates.
void testPredicateEqParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with eq predicate.
void testPredicateNeParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with ne predicate.
void testPredicateGeParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with ge predicate.
void testPredicateGtParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with gt predicate.
void testPredicateLeParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with le predicate.
void testPredicateLtParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with lt predicate.
void testPredicateNegParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with neg predicate.
void testPredicateAbsParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with abs predicate.
void testPredicateAddParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with add predicate.
void testPredicateSubParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with sub predicate.
void testPredicateMulParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with mul predicate.
void testPredicateDivParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with div predicate.
void testPredicateModParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with mod predicate.
void testPredicatePowParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with pow predicate.
void testPredicateMinParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with min predicate.
void testPredicateMaxParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with max predicate.
void testPredicateIfParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) with if predicate.
void testComposedPredicateParser ()
 Test method for parsePredicate(Element constraint, Element predicate, Store store) on more complex predicates.
void testGlobalConstraintAllDifferentParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on allDifferent constraint.
void testGlobalConstraintCumulativeParser ()
 Tests the parsing of the global constraint Cumulative.
void testGlobalConstraintWeightedSumEqParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with eq atom.
void testGlobalConstraintWeightedSumNeParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with ne atom.
void testGlobalConstraintWeightedSumGeParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with ge atom.
void testGlobalConstraintWeightedSumGtParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with gt atom.
void testGlobalConstraintWeightedSumLeParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with le atom.
void testGlobalConstraintWeightedSumLtParser ()
 Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with lt atom.
void testGlobalConstraintElementParser ()
 Test for the Element constraint.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Member Functions

void createConstraint (String scope, String parameters, String predicate)
 This method creates a constraint and a predicate in XCSP standard and passes them to the parser that will create the corresponding constraints in the store.
boolean getSolution ()
 Perform a depth first search on every variables contained in allVars.
void resetStore ()
 Small tool that creates a new store with 50 variables each one having a singleton domain 25 variables with positive values: v0::0, v1::1, v2::2, ..., v24::24 25 variables with negative values: vm0::0, vm1::-1, vm2::-2, ..., vm24::-24.

Private Attributes

StoreCloneable store
 The store.
IntVarCloneable[] allVars
 All the variables created in the store.
String constraintName
 The name of the constraint.

Detailed Description

Test suite for JaCopxcspParser.

Author
Arnaud Jutzeler, Thomas Leaute
Todo

add tests for the parseRelation() method

add tests for functions

Constructor & Destructor Documentation

◆ JaCopxcspParserTest() [1/2]

frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.JaCopxcspParserTest ( String name,
String constraintName )

Generates a test using the specified method.

Parameters
namename of the method
constraintNamename of the constraint

References constraintName.

Referenced by suite().

◆ JaCopxcspParserTest() [2/2]

frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.JaCopxcspParserTest ( String name)

Generates a test using the specified method.

Parameters
namename of the method

Member Function Documentation

◆ createConstraint()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.createConstraint ( String scope,
String parameters,
String predicate )
private

◆ getSolution()

◆ resetStore()

◆ setUp()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.setUp ( ) throws Exception
protected
See also
junit.framework.TestCase#setUp()

◆ suite()

TestSuite frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.suite ( )
static
Returns
the test suite for this test

References JaCopxcspParserTest(), and suite().

Referenced by frodo2.solutionSpaces.JaCoP.tests.AllTestsJaCoP.suite(), and suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.tearDown ( ) throws Exception
protected
See also
junit.framework.TestCase#tearDown()

◆ testComposedPredicateParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testComposedPredicateParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) on more complex predicates.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testGlobalConstraintAllDifferentParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintAllDifferentParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on allDifferent constraint.

References getSolution(), frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), resetStore(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintCumulativeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintCumulativeParser ( )

Tests the parsing of the global constraint Cumulative.

References getSolution(), frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), resetStore(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintElementParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintElementParser ( )

Test for the Element constraint.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumEqParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumEqParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with eq atom.

References getSolution(), frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), resetStore(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumGeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumGeParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with ge atom.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumGtParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumGtParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with gt atom.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumLeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumLeParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with le atom.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumLtParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumLtParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with lt atom.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testGlobalConstraintWeightedSumNeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintWeightedSumNeParser ( )

Test method for imposeGlobalConstraint(Element constraint, Store store) on WeightedSum constraint with ne atom.

References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

Here is the call graph for this function:

◆ testPredicateAbsParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateAbsParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with abs predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateAddParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateAddParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with add predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateAndParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateAndParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with and predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateDivParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateDivParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with div predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateEqParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateEqParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with eq predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateGeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateGeParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with ge predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateGtParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateGtParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with gt predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateIffParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateIffParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with iff predicates.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateIfParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateIfParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with if predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateLeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateLeParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with le predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateLtParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateLtParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with lt predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateMaxParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateMaxParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with max predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateMinParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateMinParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with min predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateModParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateModParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with mod predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateMulParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateMulParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with mul predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateNegParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateNegParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with neg predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateNeParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateNeParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with ne predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateNotParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateNotParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with not predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateOrParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateOrParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with or predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicatePowParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicatePowParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with pow predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateSubParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateSubParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with sub predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

◆ testPredicateXorParser()

void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testPredicateXorParser ( )

Test method for parsePredicate(Element constraint, Element predicate, Store store) with xor predicate.

References createConstraint(), getSolution(), and resetStore().

Here is the call graph for this function:

Member Data Documentation

◆ allVars

IntVarCloneable [] frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.allVars
private

All the variables created in the store.

Referenced by getSolution(), and resetStore().

◆ constraintName

String frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.constraintName
private

The name of the constraint.

Referenced by JaCopxcspParserTest().

◆ store


The documentation for this class was generated from the following file: