package
0.0.0-20201217082556-cfb43544739f
Repository: https://github.com/zephyrtronium/iolang.git
Documentation: pkg.go.dev

# README

testutils

GoDoc

Package testutils provides utilities for testing Io code in Go:

  • TestingVM provides synchronized access to a VM for executing code. Also, ResetTestingVM restores that VM to a fresh, clean state.
  • SourceTestCase creates sub-test functions that execute code and check the result using one of various predicates (which Pass* functions provide).
  • CheckSlots is a helper that checks that an object has exactly the expected slots.
  • CheckObjectIsProto is a helper that checks that an object has Core Object as its only proto.

The contents of this package are copied from internal testing code. To read example usage, see e.g. object_test.go in the base iolang package.