Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestAPI with core-builtins code #78

Open
bulent2k2 opened this issue Aug 4, 2022 · 1 comment
Open

TestAPI with core-builtins code #78

bulent2k2 opened this issue Aug 4, 2022 · 1 comment

Comments

@bulent2k2
Copy link
Contributor

bulent2k2 commented Aug 4, 2022

"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]   ...
@litan
Copy link
Owner

litan commented Aug 5, 2022

Will be a good thing to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants