Skip to content

SuperInstance/flux-testkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLUX TestKit — Test Harness Framework

Write and run FLUX program tests with assertion helpers.

Features

  • Test suite definition with add_test() or @test decorator
  • Assertion helpers: assert_register, assert_cycles, assert_bytecode_size, assert_true
  • Built-in lightweight VM for test execution
  • Markdown report generation with ✅/❌/💥 icons
  • Error handling with graceful failure reporting

Usage

from testkit import FluxTestSuite

suite = FluxTestSuite("my_tests")
suite.add_test("factorial", lambda ctx, vm: (
    ctx.assert_register(vm.run([0x18,0,6, 0x18,1,1, 0x22,1,1,0, 0x09,0, 0x3D,0,0xFA,0, 0x00])[0], 1, 720)
))
result = suite.run()
print(result.to_markdown())

8 tests passing.

About

FLUX test harness framework — assertion helpers, suites, reports

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages