Skip to content

Instantly share code, notes, and snippets.

View FractalDesigns's full-sized avatar
🏠
Working from home

Achraf Elafrit FractalDesigns

🏠
Working from home
View GitHub Profile
@FractalDesigns
FractalDesigns / unitTest.pony
Created June 22, 2016 15:54
unit testing in pony
use "ponytest"
actor Main is TestList
new create(env : Env) => PonyTest(env, this)
new make() => None
fun tag tests (test : PonyTest) =>
//activating the Yeppp library
let status = @yepLibrary_Init[None]()
test(_Polyval)
class iso _Polyval is UnitTest
primitive Handlers
fun handler_F64 (env:Env) =>
env.out.print("handler_F64 is called")
fun handler_F32 (env:Env) =>
env.out.print("handler_F32 is called")
fun else_handler(env:Env) =>
env.out.print("else_handler is called")
fun dispatch(x: (F64|F32|U64), env:Env)=>