Checkpoint
This commit is contained in:
parent
5bfa1691dd
commit
a85169dced
27 changed files with 377 additions and 250 deletions
|
|
@ -6,7 +6,6 @@ import org.junit.jupiter.api.Nested
|
|||
import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.ValueSource
|
||||
import parser.grammars.TermsGrammar
|
||||
import prolog.Program
|
||||
import prolog.ast.arithmetic.Float
|
||||
import prolog.ast.arithmetic.Integer
|
||||
import prolog.ast.terms.Atom
|
||||
|
|
|
|||
|
|
@ -604,5 +604,19 @@ class PreprocessorTests {
|
|||
|
||||
assertEquals(expected, result)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `dynamic declaration`() {
|
||||
val input = Structure(
|
||||
Atom("dynamic"), listOf(
|
||||
Atom("declaration/1")
|
||||
)
|
||||
)
|
||||
val expected = Dynamic("declaration/1")
|
||||
|
||||
val result = preprocessor.preprocess(input)
|
||||
|
||||
assertEquals(expected, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package interpreter
|
|||
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import prolog.Program
|
||||
import prolog.ast.Database.Program
|
||||
|
||||
class SourceFileReaderTests {
|
||||
@BeforeEach
|
||||
fun setup() {
|
||||
Program.clear()
|
||||
Program.reset()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Reference in a new issue