-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
266eacb
commit bc1b9b6
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/test/java/org/logicng/solvers/datastructures/LNGHeapTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.logicng.solvers.datastructures; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.logicng.collections.LNGIntVector; | ||
import org.logicng.formulas.FormulaFactory; | ||
import org.logicng.solvers.MiniSat; | ||
import org.logicng.solvers.sat.MiniCard; | ||
import org.logicng.solvers.sat.MiniSatStyleSolver; | ||
|
||
/** | ||
* Unit tests for the class {@link LNGHeap}. | ||
*/ | ||
public class LNGHeapTest { | ||
|
||
@Test | ||
public void test(){ | ||
MiniSatStyleSolver solver = new MiniCard(); | ||
LNGHeap heap = new LNGHeap(solver); | ||
Assert.assertTrue(heap.empty()); | ||
heap.insert(5); | ||
Assert.assertTrue(heap.toString().contains("5")); | ||
Assert.assertEquals(1,heap.size()); | ||
heap.clear(); | ||
Assert.assertTrue(heap.empty()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters