Skip to content

TestAPI with core-builtins code #78

Description

@bulent2k2

"To get access to builtins in a test, the best way is to probably build up a stub code execution context."

We would like to provide a basic test that uses builtins (assuming no such test already exists.) So that we could test many commands that depend on builtins. e.g. epochTime.

At the moment, calling any such command results in a runtime error (compiler is not able to catch this problem):

[info] - Translation of java.util.Calendar and System.nanoTime etc to work *** FAILED ***
[info]   java.lang.NullPointerException:
[info]   at net.kogics.kojo.lite.i18n.TurkishAPI$.buAn(trInit.scala:237)
[info]   at net.kogics.kojo.lite.i18n.TurkishAPITest.$anonfun$new$121(TurkishAPITest.scala:686)
[info]   at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[info]   at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[info]   at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[info]   at org.scalatest.Transformer.apply(Transformer.scala:22)
[info]   at org.scalatest.Transformer.apply(Transformer.scala:20)
[info]   at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
[info]   at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
[info]   at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
[info]   ...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions