diff --git a/src/prolog/builtins/terms.kt b/src/prolog/logic/terms.kt similarity index 100% rename from src/prolog/builtins/terms.kt rename to src/prolog/logic/terms.kt diff --git a/tests/lexer/LexerScanPrologTest.kt b/tests/lexer/ScanPrologTests.kt similarity index 98% rename from tests/lexer/LexerScanPrologTest.kt rename to tests/lexer/ScanPrologTests.kt index 7d25492..4f39a60 100644 --- a/tests/lexer/LexerScanPrologTest.kt +++ b/tests/lexer/ScanPrologTests.kt @@ -9,7 +9,7 @@ import kotlin.test.assertEquals * * These tests are based on the Prolog syntax. */ -class LexerScanPrologTest { +class ScanPrologTests { @Test fun scan_simple_atom() { val tokens = Lexer("atom.").scan() diff --git a/tests/lexer/LexerScanTest.kt b/tests/lexer/ScanTests.kt similarity index 99% rename from tests/lexer/LexerScanTest.kt rename to tests/lexer/ScanTests.kt index bd4d515..808ef1a 100644 --- a/tests/lexer/LexerScanTest.kt +++ b/tests/lexer/ScanTests.kt @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows import org.junit.jupiter.api.Assertions.* -class LexerScanTest { +class ScanTests { @Test fun scan_emptyString_returns_EOF() { val tokens = Lexer("").scan() diff --git a/tests/prolog/EvaluationTest.kt b/tests/prolog/EvaluationTests.kt similarity index 99% rename from tests/prolog/EvaluationTest.kt rename to tests/prolog/EvaluationTests.kt index de58432..6fd5fe5 100644 --- a/tests/prolog/EvaluationTest.kt +++ b/tests/prolog/EvaluationTests.kt @@ -13,7 +13,7 @@ import prolog.ast.terms.Atom import prolog.ast.terms.Structure import prolog.ast.terms.Variable -class EvaluationTest { +class EvaluationTests { @BeforeEach fun setUp() { Program.clear() diff --git a/tests/prolog/builtins/TermAnalysisConstructionTest.kt b/tests/prolog/builtins/TermAnalysisConstructionTest.kt index 09c5a0a..a137fca 100644 --- a/tests/prolog/builtins/TermAnalysisConstructionTest.kt +++ b/tests/prolog/builtins/TermAnalysisConstructionTest.kt @@ -7,6 +7,7 @@ import prolog.ast.terms.Atom import prolog.ast.terms.Structure import prolog.logic.atomic import prolog.logic.compound +import prolog.logic.functor /** * 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) diff --git a/tests/prolog/builtins/UnificationTest.kt b/tests/prolog/builtins/UnificationOperatorsTests.kt similarity index 97% rename from tests/prolog/builtins/UnificationTest.kt rename to tests/prolog/builtins/UnificationOperatorsTests.kt index 6ca212a..73dcfc7 100644 --- a/tests/prolog/builtins/UnificationTest.kt +++ b/tests/prolog/builtins/UnificationOperatorsTests.kt @@ -6,7 +6,7 @@ import prolog.ast.terms.Atom import prolog.ast.arithmetic.Integer import prolog.ast.terms.Variable -class UnificationTest { +class UnificationOperatorsTests { /** * ?- X == a. * false. diff --git a/tests/prolog/logic/UnifyTest.kt b/tests/prolog/logic/UnifyTests.kt similarity index 99% rename from tests/prolog/logic/UnifyTest.kt rename to tests/prolog/logic/UnifyTests.kt index c306081..f2b3c57 100644 --- a/tests/prolog/logic/UnifyTest.kt +++ b/tests/prolog/logic/UnifyTests.kt @@ -13,7 +13,7 @@ import prolog.builtins.Add /* * Based on: https://en.wikipedia.org/wiki/Unification_%28computer_science%29#Examples_of_syntactic_unification_of_first-order_terms */ -class UnifyTest { +class UnifyTests { @Test fun identical_atoms_unify() { val atom1 = Atom("a") diff --git a/tests/prolog/builtins/VerificationTest.kt b/tests/prolog/logic/VerificationTests.kt similarity index 97% rename from tests/prolog/builtins/VerificationTest.kt rename to tests/prolog/logic/VerificationTests.kt index 632808d..7631003 100644 --- a/tests/prolog/builtins/VerificationTest.kt +++ b/tests/prolog/logic/VerificationTests.kt @@ -1,4 +1,4 @@ -package prolog.builtins +package prolog.logic import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue @@ -7,11 +7,8 @@ import prolog.Substitutions import prolog.ast.terms.Atom import prolog.ast.terms.Structure import prolog.ast.terms.Variable -import prolog.logic.compound -import prolog.logic.nonvariable -import prolog.logic.variable -class VerificationTest { +class VerificationTests { @Test fun unbound_variable_is_var() { val variable = Variable("X")