over time, we got quite a jungle with all those shome-me-the-type-of helper functions. Reduced and unified all those into - typeString : a human readable, slightly simplified full type - typeSymbol : a single word identifier, extracted lexically from the type note: this changeset causes a lot of tests to break, since we're using unmangeled type-IDs pretty much everywhere now. Beore fixing those, I'll have to implement a better simplification scheme for the "human readable" type names....
91 lines
3.2 KiB
Text
91 lines
3.2 KiB
Text
TESTING "Test support and helpers" ./test-suite --group=common
|
||
|
||
|
||
|
||
TEST "Test support functions" TestHelper_test <<END
|
||
out: [a-z0-9]{80}$
|
||
out: Displaying types and sizes....
|
||
out: sizeof..just a char.+ = 1
|
||
out: sizeof.+lib.+test.+test.+Murpf.+ = 1
|
||
out: sizeof.+lib.+test.+test.+Wrmrmpft.+ = 2
|
||
out: sizeof.+lib.+test.+test.+Wrmrmpft.+ = 3
|
||
out: sizeof.+lib.+test.+test.+Wrmrmpft.+Murpf.+ = 1
|
||
out: sizeof..everything.+ = 42
|
||
END
|
||
|
||
|
||
TEST "Helper for event registration and verification" TestEventLog_test <<END
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match("γ")
|
||
err: ..after HEAD TestEventLog_test.+
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match("α")
|
||
err-lit: ..after match("β") @ Rec(event|{β})
|
||
err: ..after HEAD TestEventLog_test.+
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match("ham")
|
||
err-lit: ..before match("beans") @ Rec(EventLogHeader| this = baked beans )
|
||
err-lit: ..before match("spam") @ Rec(event|{spam})
|
||
err-lit: ..after HEAD baked beans
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FOUND at least match("ham") @ Rec(event|{ham})
|
||
err-lit: ..after match("eggs") @ Rec(EventLogHeader| this = eggs )
|
||
err-lit: ..before match("spam") @ Rec(event|{spam})
|
||
err-lit: ..after match("spam") @ Rec(event|{spam})
|
||
err-lit: ..after HEAD eggs
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match("some")
|
||
err-lit: ..before match-event("fun") @ Rec(event| ID = no |{fun})
|
||
err-lit: ..after HEAD event trace
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match-event("stuff")
|
||
err-lit: ..after HEAD theHog
|
||
err-lit: __Log_condition_violated__
|
||
err-lit: FAILED to match-event("danger")
|
||
err-lit: ..after HEAD theHog
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Helper to show demangled C++ names" TestHelperDemangling_test <<END
|
||
out: .+lib.test.test.Space.+Outer.+Inner
|
||
out-lit: lib::test::test::Space const* (*)(lib::test::test::Outer<lib::test::test::Space>::Inner const&&)
|
||
END
|
||
|
||
|
||
TEST "Testsuite option handling" TestOption_test <<END
|
||
out: Testing invocation with cmdline: ...
|
||
out: --> Testgroup=ALL
|
||
out: --> Test-ID =--missing--
|
||
out: --> remaining=
|
||
out: Testing invocation with cmdline: --help...
|
||
out: --> Testgroup=ALL
|
||
out: --> Test-ID =--missing--
|
||
out: --> remaining=
|
||
out: Testing invocation with cmdline: --group TestGroupID...
|
||
out: --> Testgroup=TestGroupID
|
||
out: --> Test-ID =--missing--
|
||
out: --> remaining=
|
||
out: Testing invocation with cmdline: SingleTestID...
|
||
out: --> Testgroup=ALL
|
||
out: --> Test-ID =SingleTestID
|
||
out: --> remaining=SingleTestID
|
||
out: Testing invocation with cmdline: SingleTestID --group TestGroupID...
|
||
out: --> Testgroup=TestGroupID
|
||
out: --> Test-ID =SingleTestID
|
||
out: --> remaining=SingleTestID
|
||
out: Testing invocation with cmdline: --group TestGroupID SingleTestID ...
|
||
out: --> Testgroup=TestGroupID
|
||
out: --> Test-ID =SingleTestID
|
||
out: --> remaining=SingleTestID
|
||
out: Testing invocation with cmdline: --group TestGroupID SingleTestID spam eggs...
|
||
out: --> Testgroup=TestGroupID
|
||
out: --> Test-ID =SingleTestID
|
||
out: --> remaining=SingleTestID spam eggs
|
||
out: Testing invocation with cmdline: SingleTestID spam --group TestGroupID --eggs...
|
||
out: --> Testgroup=TestGroupID
|
||
out: --> Test-ID =SingleTestID
|
||
out: --> remaining=SingleTestID spam --eggs
|
||
END
|
||
|
||
|