Unit tests for CentralLinearOrdering.
More...
|
| static TestSuite | suite () |
|
| final ReentrantLock | finished_lock = new ReentrantLock () |
| | Used to make the test thread wait.
|
| final Condition | finished = finished_lock.newCondition() |
| | Used to wake up the test thread when all agents have finished.
|
Unit tests for CentralLinearOrdering.
- Author
- Thomas Leaute
◆ CentralLinearOrderingTest()
| frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.CentralLinearOrderingTest |
( |
| ) |
|
Constructor from a test method.
Referenced by suite().
◆ getMsgTypes()
| Collection< MessageType > frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.getMsgTypes |
( |
| ) |
|
◆ notifyIn()
| void frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.notifyIn |
( |
Message | msg | ) |
|
◆ setQueue()
| void frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.setQueue |
( |
Queue | queue | ) |
|
◆ setUp()
| void frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.setUp |
( |
| ) |
|
|
protected |
◆ suite()
| TestSuite frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.suite |
( |
| ) |
|
|
static |
◆ tearDown()
| void frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.tearDown |
( |
| ) |
throws Exception |
|
protected |
- See also
- junit.framework.TestCase#tearDown()
References pipes, and queues.
◆ test()
| void frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.test |
( |
| ) |
throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException |
Test method.
- Exceptions
-
| IOException | if an I/O error occurred when creating the pipes |
| NoSuchMethodException | if the module does not have a constructor with the proper signature |
| IllegalArgumentException | should never happen |
| InstantiationException | if the module is an abstract class |
| IllegalAccessException | if the module's constructor is not accessible |
| InvocationTargetException | if the module's constructor throws an exception |
References frodo2.communication.Queue.addIncomingMessagePolicy(), frodo2.algorithms.test.AllTests.createQueueNetwork(), frodo2.communication.Queue.end(), graph, parser, pipes, queues, frodo2.communication.Queue.setProblem(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.START_AGENT, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.varOrdering.linear.OrderMsg< V extends Addable< V >, U extends Addable< U > >.STATS_MSG_TYPE, and test().
Referenced by test().
◆ clusteredOrder
| List< List<String> > frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.clusteredOrder |
|
private |
The chosen (clustered) order on variables.
◆ finished
| final Condition frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.finished = finished_lock.newCondition() |
|
protected |
Used to wake up the test thread when all agents have finished.
◆ finished_lock
| final ReentrantLock frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.finished_lock = new ReentrantLock () |
|
protected |
Used to make the test thread wait.
◆ graph
| Graph frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.graph |
|
private |
The constraint graph for the overall problem.
Referenced by setUp(), and test().
◆ maxNbrAgents
| final int frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.maxNbrAgents = 10 |
|
private |
Maximum number of agents.
Referenced by setUp().
◆ maxNbrEdges
| final int frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.maxNbrEdges = 100 |
|
private |
Maximum number of edges in the random graph.
Referenced by setUp().
◆ maxNbrVars
| final int frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.maxNbrVars = 15 |
|
private |
Maximum number of variables in the random graph.
- Note
- Must be at least 2.
Referenced by setUp().
◆ order
| List<String> frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.order |
|
private |
The chosen (flat) order on variables.
◆ owners
| List<String> frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.owners |
|
private |
The reported list of owners.
◆ parser
The parser for the overall problem.
Referenced by test().
◆ pipes
One output pipe used to send messages to each queue, indexed by the queue's agent name.
Referenced by tearDown(), and test().
◆ queues
| Map<String, Queue> frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.queues |
|
private |
◆ remainingOutputs
| int frodo2.algorithms.varOrdering.linear.tests.CentralLinearOrderingTest.remainingOutputs |
|
private |
The number of output messages we are still waiting for.
The documentation for this class was generated from the following file: