Unfortunately, there are some common syntactic structures, which can not easily be dissected by regular expressions alone, since they entail nested subexpressions. While it is possible to get beyond those fundamental limitations with some trickery, doing so remains precisely that, ''trickery.'' After fighting some inner conflicts, since ''I do know how to write a parser'' — in the end I have brought myself to just do it. And indeed, as you'd might expect, I have looked into existing library solutions, and I would not like to have any one of them as part of the project. * I do not want a ''parser engine'' or ''parser generator'' * I want the directness of recursive-descent, but combined with Regular Expressions as terminal * I want to see the structure of the used grammar at the definition site of the custom parser function * I want deep integration of ''model bindings'' into the parse process, i.e. binding-λ * I do not want to write model-dissecting or pattern-matching code after the parse * I do not want to expose ''Monads'' as an interface, since they tend to spread unhealthy structure to surrounding code * I do not want to leak technicalities of the parse mechanics into the using code * I do not want to impose hard to remember specific conventions onto the user Thus I've set the following aims: * The usage should require only a single header include (ideally header-only) * The entrance point should be a small number of DSL-starter functions * The parser shall be implemented by recursive-descent, using the parser-combinator technique * But I want that wrapped into a DSL, to be able to control what is (not) provided or exposed. * I want a stateful, applicative logic, since parsing, by its very nature, is stateful! * I want complete compile-time typing, visible to the optimiser, without a virtual »Parser« interface And last but not least, ''I do not want to create a ticket, since I do not know if those goals can be achieved...''
850 lines
26 KiB
Text
850 lines
26 KiB
Text
TESTING "Library Test Suite: basic and low-level components" ./test-suite --group=common
|
||
|
||
|
||
|
||
TEST "Builder Support (qualifiers)" BuilderQualifierSupport_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "CmdlineWrapper_test" CmdlineWrapper_test <<END
|
||
out-lit: wrapping cmdline:...
|
||
out-lit: -->
|
||
out-lit: wrapping cmdline:
|
||
out-lit: ...
|
||
out-lit: -->
|
||
out-lit: wrapping cmdline:spam...
|
||
out-lit: 0|spam|
|
||
out-lit: -->spam
|
||
out-lit: wrapping cmdline:
|
||
out-lit: spam...
|
||
out-lit: 0|spam|
|
||
out-lit: -->spam
|
||
out-lit: wrapping cmdline:eat more spam...
|
||
out-lit: 0|eat|
|
||
out-lit: 1|more|
|
||
out-lit: 2|spam|
|
||
out-lit: -->eat more spam
|
||
out-lit: wrapping cmdline: oo _O()O_ ☭ + €...
|
||
out-lit: 0|oo|
|
||
out-lit: 1|_O()O_|
|
||
out-lit: 2|☭|
|
||
out-lit: 3|+|
|
||
out-lit: 4|€|
|
||
out-lit: -->oo _O()O_ ☭ + €
|
||
out-lit: wrapping cmdline:Ω ooΩ oΩo Ωoo...
|
||
out-lit: 0|Ω|
|
||
out-lit: 1|ooΩ|
|
||
out-lit: 2|oΩo|
|
||
out-lit: 3|Ωoo|
|
||
out-lit: -->Ω ooΩ oΩo Ωoo
|
||
out-lit: Standard Cmdlineformat:one two
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "CustomSharedPtr_test" CustomSharedPtr_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Deleter function collection" DelStash_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Thread-local diagnostic context" DiagnosticContext_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: apply list diff to target sequence" DiffListApplication_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: compare sequences to generate list diff" DiffListGeneration_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: lookup table helper" DiffIndexTable_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: reshape a tree data structure through diff (1)" DiffTreeApplicationSimple_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: reshape a tree data structure through diff (2)" DiffTreeApplication_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: Generic recursive mutation with closure binding" TreeMutator_test <<END
|
||
out-lit: |
|
||
out-lit: | »simpleAttributeBinding«
|
||
out: concrete TreeMutator .+Builder<ChangeOperation<TreeMutator, test::TreeMutator_test::simpleAttributeBinding().+lambda\(string\).+> >
|
||
out-lit: "data" closure received something that would be acceptable
|
||
out-lit: localData changed to: that would be acceptable
|
||
out-lit: |
|
||
out-lit: | »simpleCollectionBinding«
|
||
out-lit: a, b
|
||
out: concrete TreeMutator .+Builder<ChildCollectionMutator<TreeMutator,
|
||
out-lit: c, b
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: mapping of changes onto opaque tree data" TreeMutatorBinding_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: integration test with opaque target data" DiffComplexApplication_test <<END
|
||
out-lit: before...
|
||
out: Opaque.+__\(α:-1 β:-1 γ:-1.00000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:$
|
||
out: data:$
|
||
out: \)__END_Opaque.+
|
||
out-lit: after...I
|
||
out: Opaque.+__\(α:1 β:-1 γ:3.45000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:$
|
||
out: data:b, b, 78:56:34\.012$
|
||
out: \)__END_Opaque.+
|
||
out-lit: after...II
|
||
out: Opaque.+__\(α:1 β:2 γ:3.45000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:_CHILD_Record.+__\(α:-1 β:-1 γ:-1.00000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:$
|
||
out: data:$
|
||
out: \)__END__CHILD_Record.+
|
||
out: data:78:56:34\.012, b$
|
||
out: \)__END_Opaque.+
|
||
out-lit: after...III
|
||
out: Opaque.+__\(α:1 β:2 γ:3.14159 δ:unique_ptr.+ ↗≺ζ≻.+__\(α:-1 β:-1 γ:-1.00000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:$
|
||
out: data:a, a, a$
|
||
out: \)__END_≺ζ≻\.+
|
||
out: nested:_CHILD_Record.+≺ξ≻.+__\(α:-1 β:2 γ:-1.00000 δ:⟂ «unique_ptr<Opaque>»
|
||
out: nested:$
|
||
out: data:b, a$
|
||
out: \)__END__CHILD_Record.+≺ξ≻.+
|
||
out: data:78:56:34.012, b$
|
||
out: \)__END_Opaque.+
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: accept and ignore arbitrary diff" DiffIgnoreChanges_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Diff: listener for structural changes" DiffTreeMutationListener_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "A Digxel (numeric component)" Digxel_test <<END
|
||
out-lit: empty____## +0.0 ##
|
||
out-lit: value____##-88.8 ##
|
||
out: timings\(\w+\)....*ns
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Digxel standard configurations" DigxelConfigurations_test <<END
|
||
out-lit: Digxel<int, digxel::Formatter<int> >--empty-- 0--(val=123)--123|
|
||
out-lit: Digxel<double, digxel::Formatter<double> >--empty--00.000--(val=123.457)--123.457|
|
||
out-lit: Digxel<int, digxel::SexaFormatter>--empty--00--(val=42)--42|
|
||
out-lit: Digxel<int, digxel::SexaFormatter>--empty--00--(val=-5)---5|
|
||
out-lit: Digxel<uint, digxel::HexaFormatter>--empty--00--(val=12)--0C|
|
||
out-lit: Digxel<uint, digxel::HexaFormatter>--empty--00--(val=111)--6F|
|
||
out-lit: Digxel<long, digxel::CountFormatter>--empty--0000--(val=-1234567890)---1234567890|
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "plain entry-ID" EntryID_test <<END
|
||
out: ID<Dummy>-Dummy.0..
|
||
out: ID<Dummy>-strange
|
||
out: ID<Dummy>-Dummy.0..
|
||
out: ID<Fork>-Fork.0..
|
||
out: ID<Fork>-special
|
||
out: sizeof\( idi::EntryID<Fork> \) .+ =
|
||
out: sizeof\( idi::BareEntryID \) .+ =
|
||
out: sizeof\( \w+[^\)]* \) .+ =
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Filesystem manipulations" FileSupport_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "formatting/string conversion in output" FormatCOUT_test <<END
|
||
out-lit: Type: int ......
|
||
out-lit: is_StringLike<int> : No
|
||
out-lit: BasicallyString<int> : No
|
||
out-lit: BasicallyCString<int> : No
|
||
out-lit: std::is_arithmetic<int> : Yes
|
||
out-lit: can_lexical2string<int> : Yes
|
||
out-lit: can_convertToString<int> : No
|
||
out-lit: use_StringConversion4Stream<int> : No
|
||
out-lit: Type: char ......
|
||
out-lit: is_StringLike<char> : No
|
||
out-lit: BasicallyString<char> : No
|
||
out-lit: BasicallyCString<char> : No
|
||
out-lit: std::is_arithmetic<char> : Yes
|
||
out-lit: can_lexical2string<char> : Yes
|
||
out-lit: can_convertToString<char> : No
|
||
out-lit: use_StringConversion4Stream<char> : No
|
||
out-lit: Type: double ......
|
||
out-lit: is_StringLike<double> : No
|
||
out-lit: BasicallyString<double> : No
|
||
out-lit: BasicallyCString<double> : No
|
||
out-lit: std::is_arithmetic<double> : Yes
|
||
out-lit: can_lexical2string<double> : Yes
|
||
out-lit: can_convertToString<double> : No
|
||
out-lit: use_StringConversion4Stream<double> : No
|
||
out-lit: Type: int64_t ......
|
||
out-lit: is_StringLike<int64_t> : No
|
||
out-lit: BasicallyString<int64_t> : No
|
||
out-lit: BasicallyCString<int64_t> : No
|
||
out-lit: std::is_arithmetic<int64_t> : Yes
|
||
out-lit: can_lexical2string<int64_t> : Yes
|
||
out-lit: can_convertToString<int64_t> : No
|
||
out-lit: use_StringConversion4Stream<int64_t> : No
|
||
out-lit: Type: string ......
|
||
out-lit: is_StringLike<string> : Yes
|
||
out-lit: BasicallyString<string> : Yes
|
||
out-lit: BasicallyCString<string> : No
|
||
out-lit: std::is_arithmetic<string> : No
|
||
out-lit: can_lexical2string<string> : Yes
|
||
out-lit: can_convertToString<string> : Yes
|
||
out-lit: use_StringConversion4Stream<string> : No
|
||
out-lit: Type: StringPtr ......
|
||
out-lit: is_StringLike<StringPtr> : No
|
||
out-lit: BasicallyString<StringPtr> : No
|
||
out-lit: BasicallyCString<StringPtr> : No
|
||
out-lit: std::is_arithmetic<StringPtr> : No
|
||
out-lit: can_lexical2string<StringPtr> : No
|
||
out-lit: can_convertToString<StringPtr> : No
|
||
out-lit: use_StringConversion4Stream<StringPtr> : No
|
||
out-lit: Type: StringRef ......
|
||
out-lit: is_StringLike<StringRef> : Yes
|
||
out-lit: BasicallyString<StringRef> : Yes
|
||
out-lit: BasicallyCString<StringRef> : No
|
||
out-lit: std::is_arithmetic<StringRef> : No
|
||
out-lit: can_lexical2string<StringRef> : Yes
|
||
out-lit: can_convertToString<StringRef> : Yes
|
||
out-lit: use_StringConversion4Stream<StringRef> : No
|
||
out-lit: Type: StringRRef ......
|
||
out-lit: is_StringLike<StringRRef> : Yes
|
||
out-lit: BasicallyString<StringRRef> : Yes
|
||
out-lit: BasicallyCString<StringRRef> : No
|
||
out-lit: std::is_arithmetic<StringRRef> : No
|
||
out-lit: can_lexical2string<StringRRef> : Yes
|
||
out-lit: can_convertToString<StringRRef> : Yes
|
||
out-lit: use_StringConversion4Stream<StringRRef> : No
|
||
out-lit: Type: StrConstRef ......
|
||
out-lit: is_StringLike<StrConstRef> : Yes
|
||
out-lit: BasicallyString<StrConstRef> : Yes
|
||
out-lit: BasicallyCString<StrConstRef> : No
|
||
out-lit: std::is_arithmetic<StrConstRef> : No
|
||
out-lit: can_lexical2string<StrConstRef> : Yes
|
||
out-lit: can_convertToString<StrConstRef> : Yes
|
||
out-lit: use_StringConversion4Stream<StrConstRef> : No
|
||
out-lit: Type: CharLit ......
|
||
out-lit: is_StringLike<CharLit> : Yes
|
||
out-lit: BasicallyString<CharLit> : No
|
||
out-lit: BasicallyCString<CharLit> : Yes
|
||
out-lit: std::is_arithmetic<CharLit> : No
|
||
out-lit: can_lexical2string<CharLit> : Yes
|
||
out-lit: can_convertToString<CharLit> : Yes
|
||
out-lit: use_StringConversion4Stream<CharLit> : No
|
||
out-lit: Type: CharPtr ......
|
||
out-lit: is_StringLike<CharPtr> : Yes
|
||
out-lit: BasicallyString<CharPtr> : No
|
||
out-lit: BasicallyCString<CharPtr> : Yes
|
||
out-lit: std::is_arithmetic<CharPtr> : No
|
||
out-lit: can_lexical2string<CharPtr> : Yes
|
||
out-lit: can_convertToString<CharPtr> : Yes
|
||
out-lit: use_StringConversion4Stream<CharPtr> : No
|
||
out-lit: Type: Reticent ......
|
||
out-lit: is_StringLike<Reticent> : No
|
||
out-lit: BasicallyString<Reticent> : No
|
||
out-lit: BasicallyCString<Reticent> : No
|
||
out-lit: std::is_arithmetic<Reticent> : No
|
||
out-lit: can_lexical2string<Reticent> : No
|
||
out-lit: can_convertToString<Reticent> : No
|
||
out-lit: use_StringConversion4Stream<Reticent> : Yes
|
||
out-lit: Type: P<Reticent> ......
|
||
out-lit: is_StringLike<P<Reticent>> : No
|
||
out-lit: BasicallyString<P<Reticent>> : No
|
||
out-lit: BasicallyCString<P<Reticent>> : No
|
||
out-lit: std::is_arithmetic<P<Reticent>> : No
|
||
out-lit: can_lexical2string<P<Reticent>> : No
|
||
out-lit: can_convertToString<P<Reticent>> : Yes
|
||
out-lit: use_StringConversion4Stream<P<Reticent>> : Yes
|
||
out-lit: Type: GenNode ......
|
||
out-lit: is_StringLike<GenNode> : No
|
||
out-lit: BasicallyString<GenNode> : No
|
||
out-lit: BasicallyCString<GenNode> : No
|
||
out-lit: std::is_arithmetic<GenNode> : No
|
||
out-lit: can_lexical2string<GenNode> : No
|
||
out-lit: can_convertToString<GenNode> : Yes
|
||
out-lit: use_StringConversion4Stream<GenNode> : Yes
|
||
out-lit: Type: GenNodePtr ......
|
||
out-lit: is_StringLike<GenNodePtr> : No
|
||
out-lit: BasicallyString<GenNodePtr> : No
|
||
out-lit: BasicallyCString<GenNodePtr> : No
|
||
out-lit: std::is_arithmetic<GenNodePtr> : No
|
||
out-lit: can_lexical2string<GenNodePtr> : No
|
||
out-lit: can_convertToString<GenNodePtr> : No
|
||
out-lit: use_StringConversion4Stream<GenNodePtr> : No
|
||
out-lit: Type: GenNodeRef ......
|
||
out-lit: is_StringLike<GenNodeRef> : No
|
||
out-lit: BasicallyString<GenNodeRef> : No
|
||
out-lit: BasicallyCString<GenNodeRef> : No
|
||
out-lit: std::is_arithmetic<GenNodeRef> : No
|
||
out-lit: can_lexical2string<GenNodeRef> : No
|
||
out-lit: can_convertToString<GenNodeRef> : Yes
|
||
out-lit: use_StringConversion4Stream<GenNodeRef> : Yes
|
||
out-lit: Type: GenNodeRRef ......
|
||
out-lit: is_StringLike<GenNodeRRef> : No
|
||
out-lit: BasicallyString<GenNodeRRef> : No
|
||
out-lit: BasicallyCString<GenNodeRRef> : No
|
||
out-lit: std::is_arithmetic<GenNodeRRef> : No
|
||
out-lit: can_lexical2string<GenNodeRRef> : No
|
||
out-lit: can_convertToString<GenNodeRRef> : Yes
|
||
out-lit: use_StringConversion4Stream<GenNodeRRef> : Yes
|
||
out-lit: Type: P<GenNode> ......
|
||
out-lit: is_StringLike<P<GenNode>> : No
|
||
out-lit: BasicallyString<P<GenNode>> : No
|
||
out-lit: BasicallyCString<P<GenNode>> : No
|
||
out-lit: std::is_arithmetic<P<GenNode>> : No
|
||
out-lit: can_lexical2string<P<GenNode>> : No
|
||
out-lit: can_convertToString<P<GenNode>> : Yes
|
||
out-lit: use_StringConversion4Stream<P<GenNode>> : Yes
|
||
out-lit: ───────────────────────────╼━━━━━━━━━━╾───────────────────────────
|
||
out-lit: smart-ptr, no string conv...«Reticent»
|
||
out-lit: smart-ptr, custom conv......GenNode-ID("Hui")-DataCap|«string»|Buh
|
||
out-lit: reference, no string conv...«Reticent»
|
||
out-lit: reference, custom conv......GenNode-ID("Hui")-DataCap|«string»|Buh
|
||
out: pointer, custom conv......╲_....+ ↗GenNode-ID("Hui")-DataCap|«string»|Buh
|
||
out-lit: smart-ptr, NULL pointee.....⟂ P<GenNode>
|
||
out-lit: pointer, NULL pointee.....⟂ «GenNode»
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "formatting/diagnostics helpers" FormatHelper_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "formatting by string template" FormatString_test <<END
|
||
out-lit: --format-template--int=0012--double=+1.23--string=Lumiera --
|
||
out: 0x....+ _____+ .
|
||
out-lit: «test::FormatString_test::Silent»
|
||
out-lit: __nix_
|
||
out-lit: ____
|
||
out-lit: __1__
|
||
out-lit: __1__
|
||
out-lit: __⟂__
|
||
out-lit: __dirt__
|
||
out-lit: __1234__
|
||
out-lit: __0xff__
|
||
return: 0
|
||
END
|
||
|
||
|
||
PLANNED "Generic function dispatch" FunHashDispatch_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Generic ID generation" GenericIdFunction_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Generic Object Record" GenericRecord_test <<END
|
||
out-lit: enterprise = Rec(starship| Name = USS Enterprise, Registry = NCC-1701-D, Class = Galaxy, Owner = United Federation of Planets, Operator = Starfleet, built = 2363 |{Picard, Riker, Data, Troi, Worf, Crusher, La Forge})
|
||
out-lit: Name = USS Enterprise
|
||
out-lit: Registry = NCC-1701-D
|
||
out-lit: Class = Galaxy
|
||
out-lit: Owner = United Federation of Planets
|
||
out-lit: Operator= Starfleet
|
||
out-lit: built=2363
|
||
out-lit: Picard
|
||
out-lit: Riker
|
||
out-lit: Data
|
||
out-lit: Troi
|
||
out-lit: Worf
|
||
out-lit: Crusher
|
||
out-lit: La Forge
|
||
out-lit: --Attributes--
|
||
out-lit: Name = USS Enterprise
|
||
out-lit: Registry = NCC-1701-D
|
||
out-lit: Class = Galaxy
|
||
out-lit: Owner = United Federation of Planets
|
||
out-lit: Operator= Starfleet
|
||
out-lit: built=2363
|
||
out-lit: --Keys--->Name<->Registry<->Class<->Owner<->Operator<->built
|
||
out-lit: --Vals--->USS Enterprise<->NCC-1701-D<->Galaxy<->United Federation of Planets<->Starfleet<->2363
|
||
out-lit: --Crew--->Picard | Riker | Data | Troi | Worf | Crusher | La Forge
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Generic Record data node" GenNode_test <<END
|
||
out: GenNode.+_CHILD_Record.+Rec.spam..ham = DataCap.+eggs
|
||
out-lit: --spam--
|
||
out: GenNode.+"baked beans".+Rec...hasSpam = DataCap.«bool».true.+«char».+«string».*«double».+GenNode.+"spam".+«Record<GenNode>».+«string».eggs.+«string».spam.+«string».spam
|
||
out: GenNode.+"hasSpam".+«bool».true
|
||
out: GenNode.+_CHILD_char.+«char».\*
|
||
out: GenNode.+_CHILD_(basic_)?string.+«string».★
|
||
out: GenNode.+_CHILD_double.+«double».3.1415927
|
||
out: GenNode.+"spam".+«Record<GenNode>».Rec.ham.+eggs.+spam.+spam
|
||
out: GenNode.+_CHILD_(basic_)?string.+«string».eggs
|
||
out: GenNode.+_CHILD_(basic_)?string.+«string».spam
|
||
out: GenNode.+_CHILD_TimeSpan.+«TimeSpan»|0:00:00.000≺920ms≻
|
||
out: GenNode.+_CHILD_long.+«long.+42
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "generate a Gnuplot diagram" GnuplotGen_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "generate hash values" HashGenerator_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "verify indexing by hash" HashIndexed_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "bridge boost::hash to std::hash" HashStandardToBoostBridge_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Heterogeneous data in local storage" HeteroData_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Instrumentation: concurrent calls" IncidenceCount_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "IOS restore format" IosSavepoint_test <<END
|
||
out-lit: 0x2a
|
||
out-lit: 42
|
||
out-lit: ******************42
|
||
out-lit: 42
|
||
out-lit: 2a
|
||
out-lit: 052
|
||
out-lit: 2a
|
||
out-lit: 42
|
||
out-lit: 1234
|
||
out-lit: Tilt
|
||
out-lit: 42
|
||
END
|
||
|
||
|
||
TEST "Lazy init of a functor" LazyInit_test <<END
|
||
END
|
||
|
||
|
||
TEST "configurable Factory" MultiFact_test <<END
|
||
END
|
||
|
||
|
||
TEST "Family of Singleton Factories" MultiFactSingleton_test <<END
|
||
out: Impl-1
|
||
out: Impl-2
|
||
out: Impl-3
|
||
out: Impl-4
|
||
out: sizeof\( .+MultiFact.+Interface.+theID.+PassAsIs.+ \) =
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Factory argument handling" MultiFactArgument_test <<END
|
||
out: sizeof\( .+MultiFact.+Num.+prodID.+BuildRefcountPtr.+ \) =
|
||
out: fabricate\(1, 2\)
|
||
out: fabricate\(2, 3\)
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "NIL object singleton" NullValue_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "inline type erasure" OpaqueHolder_test <<END
|
||
out: 1
|
||
out: 3
|
||
out: 5
|
||
out: 7
|
||
out: sizeof\( Base . =.+[12468]{1,2}
|
||
out: sizeof\( Special . =.+[12468]{1,2}
|
||
out: sizeof\( OpaqueHolder<Base, ........ =.+[12468]{1,2}
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "inline unchecked buffer" OpaqueUncheckedBuffer_test <<END
|
||
out: DD<0>:
|
||
out-lit: DD<5>: *****
|
||
out-lit: DD<9>: I'm fine*
|
||
out-lit: I'm special, what the f** is going on here?************
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "inline val/ref wrapper" ItemWrapper_test <<END
|
||
out: ItemWrapper: sizeof\( wrapper::ItemWrapper<.+ = .
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "inline adapter for state snapshot" ReplaceableItem_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "switchable reference" OptionalRef_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "helpers for specification parsing" Parse_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "path array abstraction" PathArray_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "pick limited numbers randomly" RandomDraw_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "fractional arithmetics" Rational_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "RefArray_test" RefArray_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "verify removing values from a set" RemoveFromSet_test <<END
|
||
out-lit: removed nothing ---> [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||
out-lit: removed 0 ---> [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||
out-lit: removed 9 ---> [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
|
||
out-lit: removed 5 ---> [ 0, 1, 2, 3, 4, 6, 7, 8, 9 ]
|
||
out-lit: removed 0 2 4 6 8 ---> [ 1, 3, 5, 7, 9 ]
|
||
out-lit: removed 1 3 5 7 9 ---> [ 0, 2, 4, 6, 8 ]
|
||
out-lit: removed 0 1 2 3 4 5 6 7 8 9 ---> [ ]
|
||
out-lit: removed 0 1 2 3 4 5 6 7 8 ---> [ 9 ]
|
||
out-lit: removed 1 2 3 4 5 6 7 8 9 ---> [ 0 ]
|
||
out-lit: removed 0 1 2 3 4 6 7 8 9 ---> [ 5 ]
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Either-result-or-failure" Result_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "ScopedHolder_test" ScopedHolder_test <<END
|
||
out: checking ScopedHolder<Dummy>...
|
||
out: checking ScopedPtrHolder<Dummy>...
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "ScopedHolderTransfer_test" ScopedHolderTransfer_test <<END
|
||
out-lit: checking ScopedHolder<Dummy>...
|
||
out-lit: .
|
||
out-lit: ..install one element at index[0]
|
||
out-lit: .
|
||
out-lit: ..*** resize table to 16 elements
|
||
out-lit: .
|
||
out-lit: .throw some exceptions...
|
||
out-lit: checking ScopedPtrHolder<Dummy>...
|
||
out-lit: .
|
||
out-lit: ..install one element at index[0]
|
||
out-lit: .
|
||
out-lit: ..*** resize table to 16 elements
|
||
out-lit: .
|
||
out-lit: .throw some exceptions...
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Managed Collection (I)" ScopedCollection_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Managed Collection (II)" ScopedPtrVect_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Several elements" SeveralBuilder_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Search path walking" SearchPathSplitter_test <<END
|
||
out-lit: ➢➢a
|
||
out-lit: ➢➢a
|
||
out-lit: ➢➢a
|
||
out-lit: ➢➢b
|
||
out-lit: ➢➢a
|
||
out-lit: ➢➢b
|
||
out-lit: ➢➢c
|
||
out: ➢➢.d.
|
||
out-lit: ➢➢ e f
|
||
out-lit: ➢➢/usr/bin
|
||
out-lit: ➢➢/usr/lib
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Split/Splice segmentation" SplitSplice_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Symbol_test" Symbol_test <<END
|
||
out: one
|
||
out: sizeof. Literal.+ = (4|8)
|
||
out-lit: onenight
|
||
out-lit: minus one
|
||
out-lit: one....one
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "Hashtable with Symbol keys" SymbolHashtable_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "extensible symbolic identifier" SubID_test <<END
|
||
out: ....RGB
|
||
out: id1=R.12
|
||
out: id2=G.13
|
||
out: verify...
|
||
out: Elements in hashtable: 3
|
||
out: verify...
|
||
out: Elements in hashtable: 5
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "ownership of malloced data" UniqueMallocOwner_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "collection utils" UtilCollection_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "util: integer rounding" UtilFloordiv_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "util: integer scale wrapping" UtilFloorwrap_test <<END
|
||
out-lit: --------int--------12/4
|
||
out-lit: 12 / 4 = 3 % = 0 floor= 3.0 wrap = ( 3, 0)
|
||
out-lit: 11 / 4 = 2 % = 3 floor= 2.0 wrap = ( 2, 3)
|
||
out-lit: 10 / 4 = 2 % = 2 floor= 2.0 wrap = ( 2, 2)
|
||
out-lit: 9 / 4 = 2 % = 1 floor= 2.0 wrap = ( 2, 1)
|
||
out-lit: 8 / 4 = 2 % = 0 floor= 2.0 wrap = ( 2, 0)
|
||
out-lit: 7 / 4 = 1 % = 3 floor= 1.0 wrap = ( 1, 3)
|
||
out-lit: 6 / 4 = 1 % = 2 floor= 1.0 wrap = ( 1, 2)
|
||
out-lit: 5 / 4 = 1 % = 1 floor= 1.0 wrap = ( 1, 1)
|
||
out-lit: 4 / 4 = 1 % = 0 floor= 1.0 wrap = ( 1, 0)
|
||
out-lit: 3 / 4 = 0 % = 3 floor= 0.0 wrap = ( 0, 3)
|
||
out-lit: 2 / 4 = 0 % = 2 floor= 0.0 wrap = ( 0, 2)
|
||
out-lit: 1 / 4 = 0 % = 1 floor= 0.0 wrap = ( 0, 1)
|
||
out-lit: 0 / 4 = 0 % = 0 floor= 0.0 wrap = ( 0, 0)
|
||
out-lit: -1 / 4 = 0 % =-1 floor=-1.0 wrap = (-1, 3)
|
||
out-lit: -2 / 4 = 0 % =-2 floor=-1.0 wrap = (-1, 2)
|
||
out-lit: -3 / 4 = 0 % =-3 floor=-1.0 wrap = (-1, 1)
|
||
out-lit: -4 / 4 =-1 % = 0 floor=-1.0 wrap = (-1, 0)
|
||
out-lit: -5 / 4 =-1 % =-1 floor=-2.0 wrap = (-2, 3)
|
||
out-lit: -6 / 4 =-1 % =-2 floor=-2.0 wrap = (-2, 2)
|
||
out-lit: -7 / 4 =-1 % =-3 floor=-2.0 wrap = (-2, 1)
|
||
out-lit: -8 / 4 =-2 % = 0 floor=-2.0 wrap = (-2, 0)
|
||
out-lit: -9 / 4 =-2 % =-1 floor=-3.0 wrap = (-3, 3)
|
||
out-lit: -10 / 4 =-2 % =-2 floor=-3.0 wrap = (-3, 2)
|
||
out-lit: -11 / 4 =-2 % =-3 floor=-3.0 wrap = (-3, 1)
|
||
out-lit: -12 / 4 =-3 % = 0 floor=-3.0 wrap = (-3, 0)
|
||
out-lit: --------int--------12/-4
|
||
out-lit: 12 /-4 =-3 % = 0 floor=-3.0 wrap = (-3, 0)
|
||
out-lit: 11 /-4 =-2 % = 3 floor=-3.0 wrap = (-3,-1)
|
||
out-lit: 10 /-4 =-2 % = 2 floor=-3.0 wrap = (-3,-2)
|
||
out-lit: 9 /-4 =-2 % = 1 floor=-3.0 wrap = (-3,-3)
|
||
out-lit: 8 /-4 =-2 % = 0 floor=-2.0 wrap = (-2, 0)
|
||
out-lit: 7 /-4 =-1 % = 3 floor=-2.0 wrap = (-2,-1)
|
||
out-lit: 6 /-4 =-1 % = 2 floor=-2.0 wrap = (-2,-2)
|
||
out-lit: 5 /-4 =-1 % = 1 floor=-2.0 wrap = (-2,-3)
|
||
out-lit: 4 /-4 =-1 % = 0 floor=-1.0 wrap = (-1, 0)
|
||
out-lit: 3 /-4 = 0 % = 3 floor=-1.0 wrap = (-1,-1)
|
||
out-lit: 2 /-4 = 0 % = 2 floor=-1.0 wrap = (-1,-2)
|
||
out-lit: 1 /-4 = 0 % = 1 floor=-1.0 wrap = (-1,-3)
|
||
out-lit: 0 /-4 = 0 % = 0 floor=-0.0 wrap = ( 0, 0)
|
||
out-lit: -1 /-4 = 0 % =-1 floor= 0.0 wrap = ( 0,-1)
|
||
out-lit: -2 /-4 = 0 % =-2 floor= 0.0 wrap = ( 0,-2)
|
||
out-lit: -3 /-4 = 0 % =-3 floor= 0.0 wrap = ( 0,-3)
|
||
out-lit: -4 /-4 = 1 % = 0 floor= 1.0 wrap = ( 1, 0)
|
||
out-lit: -5 /-4 = 1 % =-1 floor= 1.0 wrap = ( 1,-1)
|
||
out-lit: -6 /-4 = 1 % =-2 floor= 1.0 wrap = ( 1,-2)
|
||
out-lit: -7 /-4 = 1 % =-3 floor= 1.0 wrap = ( 1,-3)
|
||
out-lit: -8 /-4 = 2 % = 0 floor= 2.0 wrap = ( 2, 0)
|
||
out-lit: -9 /-4 = 2 % =-1 floor= 2.0 wrap = ( 2,-1)
|
||
out-lit: -10 /-4 = 2 % =-2 floor= 2.0 wrap = ( 2,-2)
|
||
out-lit: -11 /-4 = 2 % =-3 floor= 2.0 wrap = ( 2,-3)
|
||
out-lit: -12 /-4 = 3 % = 0 floor= 3.0 wrap = ( 3, 0)
|
||
out-lit: --------long--------12/4
|
||
out-lit: 12 / 4 = 3 % = 0 floor= 3.0 wrap = ( 3, 0)
|
||
out-lit: 11 / 4 = 2 % = 3 floor= 2.0 wrap = ( 2, 3)
|
||
out-lit: 10 / 4 = 2 % = 2 floor= 2.0 wrap = ( 2, 2)
|
||
out-lit: 9 / 4 = 2 % = 1 floor= 2.0 wrap = ( 2, 1)
|
||
out-lit: 8 / 4 = 2 % = 0 floor= 2.0 wrap = ( 2, 0)
|
||
out-lit: 7 / 4 = 1 % = 3 floor= 1.0 wrap = ( 1, 3)
|
||
out-lit: 6 / 4 = 1 % = 2 floor= 1.0 wrap = ( 1, 2)
|
||
out-lit: 5 / 4 = 1 % = 1 floor= 1.0 wrap = ( 1, 1)
|
||
out-lit: 4 / 4 = 1 % = 0 floor= 1.0 wrap = ( 1, 0)
|
||
out-lit: 3 / 4 = 0 % = 3 floor= 0.0 wrap = ( 0, 3)
|
||
out-lit: 2 / 4 = 0 % = 2 floor= 0.0 wrap = ( 0, 2)
|
||
out-lit: 1 / 4 = 0 % = 1 floor= 0.0 wrap = ( 0, 1)
|
||
out-lit: 0 / 4 = 0 % = 0 floor= 0.0 wrap = ( 0, 0)
|
||
out-lit: -1 / 4 = 0 % =-1 floor=-1.0 wrap = (-1, 3)
|
||
out-lit: -2 / 4 = 0 % =-2 floor=-1.0 wrap = (-1, 2)
|
||
out-lit: -3 / 4 = 0 % =-3 floor=-1.0 wrap = (-1, 1)
|
||
out-lit: -4 / 4 =-1 % = 0 floor=-1.0 wrap = (-1, 0)
|
||
out-lit: -5 / 4 =-1 % =-1 floor=-2.0 wrap = (-2, 3)
|
||
out-lit: -6 / 4 =-1 % =-2 floor=-2.0 wrap = (-2, 2)
|
||
out-lit: -7 / 4 =-1 % =-3 floor=-2.0 wrap = (-2, 1)
|
||
out-lit: -8 / 4 =-2 % = 0 floor=-2.0 wrap = (-2, 0)
|
||
out-lit: -9 / 4 =-2 % =-1 floor=-3.0 wrap = (-3, 3)
|
||
out-lit: -10 / 4 =-2 % =-2 floor=-3.0 wrap = (-3, 2)
|
||
out-lit: -11 / 4 =-2 % =-3 floor=-3.0 wrap = (-3, 1)
|
||
out-lit: -12 / 4 =-3 % = 0 floor=-3.0 wrap = (-3, 0)
|
||
out-lit: --------long--------12/-4
|
||
out-lit: 12 /-4 =-3 % = 0 floor=-3.0 wrap = (-3, 0)
|
||
out-lit: 11 /-4 =-2 % = 3 floor=-3.0 wrap = (-3,-1)
|
||
out-lit: 10 /-4 =-2 % = 2 floor=-3.0 wrap = (-3,-2)
|
||
out-lit: 9 /-4 =-2 % = 1 floor=-3.0 wrap = (-3,-3)
|
||
out-lit: 8 /-4 =-2 % = 0 floor=-2.0 wrap = (-2, 0)
|
||
out-lit: 7 /-4 =-1 % = 3 floor=-2.0 wrap = (-2,-1)
|
||
out-lit: 6 /-4 =-1 % = 2 floor=-2.0 wrap = (-2,-2)
|
||
out-lit: 5 /-4 =-1 % = 1 floor=-2.0 wrap = (-2,-3)
|
||
out-lit: 4 /-4 =-1 % = 0 floor=-1.0 wrap = (-1, 0)
|
||
out-lit: 3 /-4 = 0 % = 3 floor=-1.0 wrap = (-1,-1)
|
||
out-lit: 2 /-4 = 0 % = 2 floor=-1.0 wrap = (-1,-2)
|
||
out-lit: 1 /-4 = 0 % = 1 floor=-1.0 wrap = (-1,-3)
|
||
out-lit: 0 /-4 = 0 % = 0 floor=-0.0 wrap = ( 0, 0)
|
||
out-lit: -1 /-4 = 0 % =-1 floor= 0.0 wrap = ( 0,-1)
|
||
out-lit: -2 /-4 = 0 % =-2 floor= 0.0 wrap = ( 0,-2)
|
||
out-lit: -3 /-4 = 0 % =-3 floor= 0.0 wrap = ( 0,-3)
|
||
out-lit: -4 /-4 = 1 % = 0 floor= 1.0 wrap = ( 1, 0)
|
||
out-lit: -5 /-4 = 1 % =-1 floor= 1.0 wrap = ( 1,-1)
|
||
out-lit: -6 /-4 = 1 % =-2 floor= 1.0 wrap = ( 1,-2)
|
||
out-lit: -7 /-4 = 1 % =-3 floor= 1.0 wrap = ( 1,-3)
|
||
out-lit: -8 /-4 = 2 % = 0 floor= 2.0 wrap = ( 2, 0)
|
||
out-lit: -9 /-4 = 2 % =-1 floor= 2.0 wrap = ( 2,-1)
|
||
out-lit: -10 /-4 = 2 % =-2 floor= 2.0 wrap = ( 2,-2)
|
||
out-lit: -11 /-4 = 2 % =-3 floor= 2.0 wrap = ( 2,-3)
|
||
out-lit: -12 /-4 = 3 % = 0 floor= 3.0 wrap = ( 3, 0)
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "util: address identity" UtilIdentity_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "util: parse text to bool" UtilParseBool_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "util: sanitised identifier" UtilSanitizedIdentifier_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "text template substitution" TextTemplate_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "tuple sequence utils" UtilTuple_test <<END
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "typesafe Variant record" Variant_test <<END
|
||
out: Variant.«bool».false
|
||
out: Variant.«int».11
|
||
out: Variant.«string».lololo
|
||
out: Variant.«Time».0:00:00.000
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "verb token based double dispatch helper" VerbFunctionDispatch_test <<END
|
||
out-lit: consuming woof -> 'Woof-Woof!'
|
||
out-lit: consuming honk -> 'Honk-Honk!'
|
||
out-lit: consuming moo -> 'Moo-Moo!'
|
||
out-lit: consuming meh -> 'Meh!'
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "verb token with embedded arguments" VerbVisitorDispatch_test <<END
|
||
out-lit: dispatching VerbPack(woof) -> 'haw-hawhaw-hawhaw-hawhaw-haw'
|
||
out-lit: dispatching VerbPack(honk) -> 'quaack-quaack!'
|
||
out-lit: dispatching VerbPack(honk) -> 'Hoonk-Hoonk!'
|
||
out-lit: dispatching VerbPack(woof) -> 'Woof..Woof..'
|
||
out-lit: dispatching VerbPack(moo) -> 'Moo__Moo__Moo'
|
||
out-lit: dispatching VerbPack(meh) -> 'Meh?'
|
||
return: 0
|
||
END
|
||
|
||
|
||
TEST "VectorTransfer_test" VectorTransfer_test <<END
|
||
return: 0
|
||
END
|
||
|