package alice.tuprolog;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
public class AtomTest {
Prolog engine;
@Before
public void setUp() {
engine = new Prolog();
}
@Test public void test0() throws PrologException {
SolveInfo solution = engine.solve("atom(atom).");
assertTrue(solution.isSuccess());
}
@Test public void test1() throws PrologException {
SolveInfo solution = engine.solve("atom('string').");
assertTrue(solution.isSuccess());
}
@Test public void test2() throws PrologException {
SolveInfo solution = engine.solve("atom(a(b)).");
assertFalse(solution.isSuccess());
}
@Test public void test3() throws PrologException {
SolveInfo solution = engine.solve("atom(Var).");
assertFalse(solution.isSuccess());
}
@Test public void test4() throws PrologException {
SolveInfo solution = engine.solve("atom([]).");
assertTrue(solution.isSuccess());
}
@Test public void test5() throws PrologException {
SolveInfo solution = engine.solve("atom(6).");
assertFalse(solution.isSuccess());
}
@Test public void test6() throws PrologException {
SolveInfo solution = engine.solve("atom(3.3).");
assertFalse(solution.isSuccess());
}
}