Skip to content

Commit

Permalink
Merge branch 'feature/testing' of gitlab.com:pika-lab/theses/thesis-g…
Browse files Browse the repository at this point in the history
…reco-aa1920 into feature/testing
  • Loading branch information
gciatto committed Aug 31, 2020
2 parents 3057d73 + 5b348db commit 3a24578
Show file tree
Hide file tree
Showing 32 changed files with 2,576 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestCall
import kotlin.test.Ignore
import kotlin.test.Test

class TestClassicCall : TestCall, SolverFactory by ClassicSolverFactory {
private val prototype = TestCall.prototype(this)

@Test
override fun testCallCut(){
prototype.testCallCut()
}

@Test
override fun testCallFail() {
prototype.testCallFail()
}

@Test
override fun testCallFailX() {
prototype.testCallFailX()
}

@Test
override fun testCallFailCall() {
prototype.testCallFailCall()
}

@Test
override fun testCallWriteX() {
prototype.testCallWriteX()
}

@Test
override fun testCallWriteCall() {
prototype.testCallWriteCall()
}

@Test
override fun testCallX() {
prototype.testCallX()
}

@Test
override fun testCallOne() {
prototype.testCallOne()
}

@Test
@Ignore
override fun testCallFailOne() {
prototype.testCallFailOne()
}

@Test
@Ignore
override fun testCallWriteOne() {
prototype.testCallWriteOne()
}

@Test
@Ignore
override fun testCallTrue() {
prototype.testCallTrue()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestFloat
import kotlin.test.Test

class TestClassicFloat : TestFloat, SolverFactory by ClassicSolverFactory {
private val prototype = TestFloat.prototype(this)

@Test
override fun testFloatDec() {
prototype.testFloatDec()
}

@Test
override fun testFloatDecNeg() {
prototype.testFloatDecNeg()
}

@Test
override fun testFloatNat() {
prototype.testFloatNat()
}

@Test
override fun testFloatAtom() {
prototype.testFloatAtom()
}

@Test
override fun testFloatX() {
prototype.testFloatX()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestFunctor
import kotlin.test.Ignore
import kotlin.test.Test

class TestClassicFunctor : TestFunctor, SolverFactory by ClassicSolverFactory {
private val prototype = TestFunctor.prototype(this)

@Test
override fun testFunArity(){
prototype.testFunArity()
}

@Test
override fun testFunArityWithSub() {
prototype.testFunArityWithSub()
}

@Test
override fun testFunMats() {
prototype.testFunMats()
}

@Test
override fun testFunArityZero() {
prototype.testFunArityZero()
}

@Test
override fun testFunWrongArity() {
prototype.testFunWrongArity()
}

@Test
override fun testFunWrongName() {
prototype.testFunWrongName()
}

@Test
@Ignore
override fun testFunXNameYArity() {
prototype.testFunXNameYArity()
}

@Test
@Ignore
override fun testFunDecNum() {
prototype.testFunDecNum()
}

@Test
override fun testFunConsOf() {
prototype.testFunConsOf()
}

@Test
override fun testFunEmptyList() {
prototype.testFunEmptyList()
}

@Test
override fun testFunXYWrongArity() {
prototype.testFunXYWrongArity()
}

@Test
override fun testFunXNArity() {
prototype.testFunXNArity()
}

@Test
override fun testFunXAArity() {
prototype.testFunXAArity()
}

@Test
override fun testFunNumName() {
prototype.testFunNumName()
}

@Test
override fun testFunFooName() {
prototype.testFunFooName()
}

@Test
override fun testFunFlag() {
prototype.testFunFlag()
}

@Test
@Ignore
override fun testFunNegativeArity() {
prototype.testFunNegativeArity()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestIfThen
import kotlin.test.Test

class TestClassicIfThen : TestIfThen, SolverFactory by ClassicSolverFactory {
private val prototype = TestIfThen.prototype(this)

@Test
override fun testIfThenFail() {
prototype.testIfThenFail()
}

@Test
override fun testIfThenFailTrue() {
prototype.testIfThenFailTrue()
}

@Test
override fun testIfThenOrWithDoubleSub() {
prototype.testIfThenOrWithDoubleSub()
}

@Test
override fun testIfThenTrue() {
prototype.testIfThenTrue()
}

@Test
override fun testIfThenXOr() {
prototype.testIfThenXOr()
}

@Test
override fun testIfThenXtoOne() {
prototype.testIfThenXtoOne()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestIfThenElse
import kotlin.test.Test

class TestClassicIfThenElse : TestIfThenElse, SolverFactory by ClassicSolverFactory {
private val prototype = TestIfThenElse.prototype(this)

@Test
override fun testIfTrueElseFail() {
prototype.testIfTrueElseFail()
}

@Test
override fun testIfFailElseTrue() {
prototype.testIfFailElseTrue()
}

@Test
override fun testIfTrueThenElseFail() {
prototype.testIfTrueThenElseFail()
}

@Test
override fun testIfFailElseFail() {
prototype.testIfFailElseFail()
}

@Test
override fun testIfXTrueElseX() {
prototype.testIfXTrueElseX()
}

@Test
override fun testIfFailElseX() {
prototype.testIfFailElseX()
}

@Test
override fun testIfThenElseOrWithDoubleSub() {
prototype.testIfThenElseOrWithDoubleSub()
}

@Test
override fun testIfOrElseTrue() {
prototype.testIfOrElseTrue()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestIs
import kotlin.test.Test

class TestClassicIs : TestIs, SolverFactory by ClassicSolverFactory {
private val prototype = TestIs.prototype(this)

@Test
override fun testIsResult() {
prototype.testIsResult()
}

@Test
override fun testIsXY(){
prototype.testIsXY()
}

@Test
override fun testIsFoo() {
prototype.testIsFoo()
}

@Test
override fun testIsNNumber() {
prototype.testIsNNumber()
}

@Test
override fun testIsNumberFoo() {
prototype.testIsNumberFoo()
}

@Test
override fun testIsXFloat() {
prototype.testIsXFloat()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package it.unibo.tuprolog.solve.systemtest

import it.unibo.tuprolog.solve.ClassicSolverFactory
import it.unibo.tuprolog.solve.SolverFactory
import it.unibo.tuprolog.solve.TestNotProvable
import kotlin.test.Ignore
import kotlin.test.Test

class TestClassicNotProvable : TestNotProvable, SolverFactory by ClassicSolverFactory {
private val prototype = TestNotProvable.prototype(this)

@Test
override fun testNPTrue() {
prototype.testNPTrue()
}

@Test
override fun testNPCut() {
prototype.testNPCut()
}

@Test
@Ignore //solver returns no
override fun testNPCutFail() {
prototype.testNPCutFail()
}

@Test
override fun testNPEquals() {
prototype.testNPEquals()
}

@Test
override fun testNPNum() {
prototype.testNPNum()
}

@Test
override fun testNPX() {
prototype.testNPX()
}

@Test
@Ignore //solver returns no
override fun testOrNotCutFail() {
prototype.testOrNotCutFail()
}
}
Loading

0 comments on commit 3a24578

Please sign in to comment.