HyloTestCase
open class HyloTestCase : XCTestCase
A test driver for executing test cases generated from Hylo source files.
This class is intended to be extended by test cases running Hylo programs through the compiler.
It contains the logic for loading and sharing a type checked instance of the standard library
across each individual test function, accessible. A unique copy of that shared instance is
assigned to programToExtend before each test.
All tests of derived classes are skipped if the loading of the standard library fails.
-
A shared program instance containing only the standard library.
Declaration
Swift
private static let base: SharedMutable<TypedProgram?> -
The program being processed by the test case.
This property is assigned before each test to a fresh copy of
baseand is intended to be extended with the code under test.Declaration
Swift
public var programToExtend: TypedProgram? -
Returns a copy of
base, creating it if necessary.Declaration
Swift
private func checkedBaseProgram() throws -> TypedProgram -
Assigns
programToExtendto a copy of the shared instance or throwsXCTSkip.Declaration
Swift
open override func setUpWithError() throws -
Destroys
programToExtend.Declaration
Swift
open override func tearDown()
View on GitHub