|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Test suite for JaCopxcspParser. More...

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. | |
Test suite for JaCopxcspParser.
add tests for the parseRelation() method
add tests for functions
| frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.JaCopxcspParserTest | ( | String | name, |
| String | constraintName ) |
Generates a test using the specified method.
| name | name of the method |
| constraintName | name of the constraint |
References constraintName.
Referenced by suite().
| frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.JaCopxcspParserTest | ( | String | name | ) |
Generates a test using the specified method.
| name | name of the method |
|
private |
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.
| scope | the scope of the constraint |
| parameters | the parameters of the constraint |
| predicate | the functional description of the predicate |
References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposePredicate(), and store.
Referenced by testComposedPredicateParser(), testPredicateAbsParser(), testPredicateAddParser(), testPredicateAndParser(), testPredicateDivParser(), testPredicateEqParser(), testPredicateGeParser(), testPredicateGtParser(), testPredicateIffParser(), testPredicateIfParser(), testPredicateLeParser(), testPredicateLtParser(), testPredicateMaxParser(), testPredicateMinParser(), testPredicateModParser(), testPredicateMulParser(), testPredicateNegParser(), testPredicateNeParser(), testPredicateNotParser(), testPredicateOrParser(), testPredicatePowParser(), testPredicateSubParser(), and testPredicateXorParser().

|
private |
Perform a depth first search on every variables contained in allVars.
References allVars, and store.
Referenced by testComposedPredicateParser(), testGlobalConstraintAllDifferentParser(), testGlobalConstraintCumulativeParser(), testGlobalConstraintWeightedSumEqParser(), testPredicateAbsParser(), testPredicateAddParser(), testPredicateAndParser(), testPredicateDivParser(), testPredicateEqParser(), testPredicateGeParser(), testPredicateGtParser(), testPredicateIffParser(), testPredicateIfParser(), testPredicateLeParser(), testPredicateLtParser(), testPredicateMaxParser(), testPredicateMinParser(), testPredicateModParser(), testPredicateMulParser(), testPredicateNegParser(), testPredicateNeParser(), testPredicateNotParser(), testPredicateOrParser(), testPredicatePowParser(), testPredicateSubParser(), and testPredicateXorParser().
|
private |
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.
References allVars, and store.
Referenced by testComposedPredicateParser(), testGlobalConstraintAllDifferentParser(), testGlobalConstraintCumulativeParser(), testGlobalConstraintWeightedSumEqParser(), testPredicateAbsParser(), testPredicateAddParser(), testPredicateAndParser(), testPredicateDivParser(), testPredicateEqParser(), testPredicateGeParser(), testPredicateGtParser(), testPredicateIffParser(), testPredicateIfParser(), testPredicateLeParser(), testPredicateLtParser(), testPredicateMaxParser(), testPredicateMinParser(), testPredicateModParser(), testPredicateMulParser(), testPredicateNegParser(), testPredicateNeParser(), testPredicateNotParser(), testPredicateOrParser(), testPredicatePowParser(), testPredicateSubParser(), and testPredicateXorParser().
|
protected |
|
static |
References JaCopxcspParserTest(), and suite().
Referenced by frodo2.solutionSpaces.JaCoP.tests.AllTestsJaCoP.suite(), and suite().

|
protected |
| 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().

| 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.

| 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.

| void frodo2.solutionSpaces.JaCoP.tests.JaCopxcspParserTest.testGlobalConstraintElementParser | ( | ) |
Test for the Element constraint.
References frodo2.solutionSpaces.JaCoP.JaCoPxcspParser< V extends Addable< V > >.imposeGlobalConstraint(), and store.

| 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.

| 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.

| 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.

| 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.

| 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.

| 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.

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

| 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().

|
private |
All the variables created in the store.
Referenced by getSolution(), and resetStore().
|
private |
The name of the constraint.
Referenced by JaCopxcspParserTest().
|
private |
The store.
Referenced by createConstraint(), getSolution(), resetStore(), testGlobalConstraintAllDifferentParser(), testGlobalConstraintCumulativeParser(), testGlobalConstraintElementParser(), testGlobalConstraintWeightedSumEqParser(), testGlobalConstraintWeightedSumGeParser(), testGlobalConstraintWeightedSumGtParser(), testGlobalConstraintWeightedSumLeParser(), testGlobalConstraintWeightedSumLtParser(), and testGlobalConstraintWeightedSumNeParser().