Cleanup 2
This commit is contained in:
parent
a9bb6e0338
commit
3c938749d0
22 changed files with 299 additions and 110 deletions
|
@ -1,13 +1,10 @@
|
|||
package prolog.logic
|
||||
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertFalse
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Test
|
||||
import prolog.ast.terms.Atom
|
||||
import prolog.ast.terms.Functor
|
||||
import prolog.ast.terms.Structure
|
||||
import prolog.ast.arithmetic.Integer
|
||||
|
||||
/**
|
||||
* Based on [Predicates for analyzing/constructing terms](https://github.com/dtonhofer/prolog_notes/blob/master/swipl_notes/about_term_analysis_and_construction/term_analysis_construction.png)
|
||||
|
@ -27,7 +24,7 @@ class TermAnalysisConstructionTest {
|
|||
|
||||
@Test
|
||||
fun compound_arity_0_properties() {
|
||||
val structure = Structure(Atom("foo"), emptyList())
|
||||
val structure = Structure("foo")
|
||||
|
||||
assertFalse(atomic(structure))
|
||||
assertTrue(compound(structure))
|
||||
|
@ -35,7 +32,7 @@ class TermAnalysisConstructionTest {
|
|||
|
||||
@Test
|
||||
fun compound_arity_1_properties() {
|
||||
val structure = Structure(Atom("foo"), listOf(Atom("bar")))
|
||||
val structure = Structure("foo", Atom("bar"))
|
||||
|
||||
assertFalse(atomic(structure))
|
||||
assertTrue(compound(structure))
|
||||
|
|
Reference in a new issue