Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 2.07 KB

readmeSetupCppia.md

File metadata and controls

41 lines (26 loc) · 2.07 KB

For using Cppia to test with latest Haxe.

Testing your library

  • You can put your tests above your methods, which solves the age old problem of do you clutter your library repo with the tests or put them is a separate repo - simple just put them with your code and just add one extra small class. haxe-doctest#haxe

  • HaxeFoundation have switched to use utest, based off Franco's library, and latest haxe-doctest support this. But you can use munit or a tink one lots are supported by haxe-doctest.

  • It's quite easy to setup in my case geom/GeomTest.hx

  • So far I have only implemented some tests in one class still very much work in progress library, but already helped clarify my thoughts, and document aspects of my library as it progresses. /geom/Matrix1x2.hx

  • Then to run my tests:

#    Cppia test
-cp src
-lib utest
-lib haxe-doctest
-lib equals
-main geom.GeomTest
-cppia geomTest.cppia
-cmd haxelib run hxcpp geomTest.cppia