link tests with stringent application scope dependencies (closes #938)

- the tests covering threadind support and object monitors
  are located in the backend test-library and linked against liblumierabackend.so
- some fundamental facilities of proc-layer moved from the library tree
  into the basic components tree, since *testing* them requires at least
  to link against liblumieracommon.so
This commit is contained in:
Fischlurch 2014-10-17 21:15:59 +02:00
parent 7c9ab5fba2
commit aa17106c41
18 changed files with 84 additions and 6133 deletions

File diff suppressed because it is too large Load diff

52
tests/00support.tests Normal file
View file

@ -0,0 +1,52 @@
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..theUniverse.+ = 42
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
END
TEST "TestOption_test" 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

22
tests/10exception.tests Normal file
View file

@ -0,0 +1,22 @@
TESTING "Exception handling and diagnostics" ./test-suite --group=common
TEST "ExceptionError_test" ExceptionError_test <<END
out: caught: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(don't panic\)...the answer is: 42
out: caught lumiera::Error: LUMIERA_ERROR_DERIVED:convoluted exception
out: caught error::Logic: LUMIERA_ERROR_FATAL:floundered \(test-2\).
out: caught error::Invalid: LUMIERA_ERROR_INVALID:invalid input or parameters \(test-3\).
out: caught lumiera::Error: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-4\).
out: caught std::runtime_error: test-5
out: caught std::exception. \(unspecific\)
out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\).....will rethrow as error::State
out: caught lumiera::Error: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\).
out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::State
out: 2nd intermediate handler caught: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::Config
out: caught lumiera::Error: LUMIERA_ERROR_CONFIG:misconfiguration -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\)\.
out: caught lumiera::Error: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
out: caught error::Logic: LUMIERA_ERROR_LOGIC:internal logic broken \(the big bang\). -- caused by: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
END

View file

@ -1,67 +1,7 @@
TESTING "Core Component Test Suite: common and basic components" ./test-suite --group=common
TESTING "Metaprogramming facilities and techniques" ./test-suite --group=common
TEST "Hello test world" HelloWorld_test 3 <<END
out-lit: This is how the world ends...
return: 0
END
TEST "Allocation Cluster" AllocationCluster_test <<END
return: 0
END
TEST "basic application state" Appconfig_test <<END
return: 0
END
TEST "Advice collaboration (basics)" AdviceBasics_test <<END
return: 0
END
PLANNED "Advice constellations" AdviceSituations_test <<END
return: 0
END
PLANNED "Advice variants and configurations" AdviceConfiguration_test <<END
return: 0
END
PLANNED "Advice multiplicity and concurrency" AdviceMultiplicity_test <<END
return: 0
END
TEST "Advice binding patterns" AdviceBindingPattern_test <<END
out-lit: --->Binding[]
out-lit: aSymbol --->Binding[aSymbol/0()]
out-lit: a.compound_Symbol-with-various.parts --->Binding[a.compound_Symbol-with-various.parts/0()]
out-lit: trailing Garbage allowed. ☢☢ eat ☠☠☠ atomic ☠☠☠ waste ☢☢ --->Binding[Garbage/0(), allowed/0(), trailing/0()]
out-lit: a, list , of ,symbols. --->Binding[a/0(), list/0(), of/0(), symbols/0()]
out-lit: nullary(). --->Binding[nullary/0()]
out-lit: nullary( ) --->Binding[nullary/0()]
out-lit: nullary . --->Binding[nullary/0()]
out-lit: predicate( with-argument ) --->Binding[predicate/1(with-argument)]
out-lit: Binding[advice.type.n7lumiera6advice4test12_GLOBAL__N_111DummyAdviceE/0(), one/0(), three/1(four), two/0()]
out-lit: b0==Binding[]
out-lit: b1==Binding[cat1/0(), cat2/0()]
out-lit: b2==Binding[cat1/0(), cat2/0()]
out-lit: b2==Binding[advice.type.n3lib4time4TimeE/0(), cat1/0(), cat2/0(), cat3/1(zzz)]
return: 0
END
TEST "Advice index implementation" AdviceIndex_test <<END
return: 0
END
TEST "implicit conversion to bool" BoolCheckable_test <<END
out: 1
out: 2
@ -83,41 +23,6 @@ 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
END
TEST "ConfigFlags_test" ConfigFlags_test <<END
out-lit: Conf0 :-
out-lit: Conf1 :-<1>-
@ -221,51 +126,6 @@ return: 0
END
TEST "CustomSharedPtr_test" CustomSharedPtr_test <<END
return: 0
END
TEST "Deleter function collection" DelStash_test <<END
return: 0
END
TEST "Dependency injection" DependencyFactory_test <<END
out-lit: ctor TargetObj(0) successful
out-lit: ctor TargetObj(1) successful
out-lit: ctor TargetObj(2) successful
out-lit: ctor TargetObj(3) successful
out-lit: dtor ~TargetObj(3) successful
out-lit: ctor TargetObj(4) successful
out-lit: dtor ~TargetObj(4) successful
out-lit: dtor ~TargetObj(2) successful
out-lit: dtor ~TargetObj(1) successful
out-lit: dtor ~TargetObj(0) successful
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: .+Digxel.+Formatter.+--empty-- 0--\(val=123\)--123\|
out: .+Digxel.+Formatter.+--empty--00.000--\(val=123.457\)--123.457
out: .+Digxel.+SexaFormatter.+--empty--00--\(val=42\)--42
out: .+Digxel.+SexaFormatter.+--empty--00--\(val=-5\)---5
out: .+Digxel.+HexaFormatter.+--empty--00--\(val=12\)--0C
out: .+Digxel.+HexaFormatter.+--empty--00--\(val=111\)--6F
out: .+Digxel.+CountFormatter.+--empty--0000--\(val=-1234567890\)---1234567890
return: 0
END
TEST "Duck typing support" DuckDetector_test <<END
out: HasNested_Core<PropperGander> : Yes
out: HasNested_Core<Propaganda> : No
@ -277,53 +137,6 @@ return: 0
END
TEST "ExceptionError_test" ExceptionError_test <<END
out: caught: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(don't panic\)...the answer is: 42
out: caught lumiera::Error: LUMIERA_ERROR_DERIVED:convoluted exception
out: caught error::Logic: LUMIERA_ERROR_FATAL:floundered \(test-2\).
out: caught error::Invalid: LUMIERA_ERROR_INVALID:invalid input or parameters \(test-3\).
out: caught lumiera::Error: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-4\).
out: caught std::runtime_error: test-5
out: caught std::exception. \(unspecific\)
out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\).....will rethrow as error::State
out: caught lumiera::Error: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-7\).
out: intermediate handler caught: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::State
out: 2nd intermediate handler caught: LUMIERA_ERROR_STATE:unforeseen state -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\).....will rethrow as error::Config
out: caught lumiera::Error: LUMIERA_ERROR_CONFIG:misconfiguration -- caused by: LUMIERA_ERROR_EXTERNAL:failure in external service \(test-8\)\.
out: caught lumiera::Error: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
out: caught error::Logic: LUMIERA_ERROR_LOGIC:internal logic broken \(the big bang\). -- caused by: LUMIERA_ERROR_LIFE_AND_UNIVERSE:and everything\? \(what is the answer\?\)\.
END
TEST "formatting/diagnostics helpers" FormatHelper_test <<END
out: Displaying some types....
out: «..util.test.Reticent.»
out: <no comment>
out: ^hey Joe!
out: ^he says: hey Joe!
out: ^the truth: 0
out: ^just a number: 1.234.*e\+56
out: ^12345X
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: «.+util.+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
TEST "functional closure" FunctionClosure_test <<END
out-lit: List1 :-<1>-<2>-<3>-
out-lit: List2 :-<5>-<6>-<7>-
@ -351,88 +164,7 @@ return: 0
END
TEST "HashGenerator_test" HashGenerator_test <<END
return: 0
END
TEST "HashIndexed_test" HashIndexed_test <<END
return: 0
END
TEST "bridge boost::hash to std::hash" HashStandardToBoostBridge_test <<END
return: 0
END
TEST "Hierarchy rebuilding" HierarchyOrientationIndicator_test <<END
return: 0
END
TEST "LifeCycle_test" LifeCycle_test <<END
return: 0
END
PLANNED "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 "metaprogramming helpers" MetaUtils_test <<END
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\( .+ \) = .*[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\( .+ItemWrapper.+ ) =
END
TEST "switchable reference" OptionalRef_test <<END
TTEST "metaprogramming helpers" MetaUtils_test <<END
return: 0
END
@ -553,275 +285,6 @@ return: 0
END
TEST "Generic Query representation" QueryText_test <<END
return: 0
END
TEST "Query support utilities" QueryUtils_test <<END
out-lit: ..original : a A AA dufte 1a _1 A_A BÄH White space §&Ω%€GΩ%€ar ☠☠☠ baäääääge!!!!! :
out-lit: normalised : a a aA dufte o1a o_1 a_A bH o white_space gar_bage :
return: 0
END
TEST "RefArray_test" RefArray_test <<END
return: 0
END
TEST "RemoveFromSet_test" 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, ]
END
TEST "SanitizedIdentifier_test" SanitizedIdentifier_test <<END
out-lit: 'Word' --> 'Word'
out-lit: 'a Sentence' --> 'a_Sentence'
out-lit: 'trailing Withespace
out-lit: ' --> 'trailing_Withespace'
out-lit: 'with a lot
out-lit: of Whitespace' --> 'with_a_lot_of_Whitespace'
out-lit: 'with"much (punctuation)[]!' --> 'withmuch_(punctuation)'
out-lit: '§&Ω%€ leading garbage' --> 'leading_garbage'
out-lit: 'mixed Ω garbage' --> 'mixed_garbage'
out-lit: 'Bääääh!!' --> 'Bh'
out-lit: '§&Ω%€' --> ''
END
TEST "ScopedHolder_test" ScopedHolder_test <<END
out: checking ScopedHolder<Dummy>...
out: checking ScopedPtrHolder<Dummy>...
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...
END
TEST "Managed Collection (I)" ScopedCollection_test <<END
return: 0
END
TEST "Managed Collection (II)" ScopedPtrVect_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
END
TEST "Singleton_test" Singleton_test 23 <<END
out-lit: testing TargetObj(23) as Singleton
out-lit: ctor TargetObj(23) successful
out-lit: calling a non-static method on the Singleton instance
out-lit: .....TargetObj(23): data="***********************", array[23]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,}
out-lit: dtor ~TargetObj(23) successful
END
TEST "SingletonSubclass_test" SingletonSubclass_test 13 <<END
out-lit: using the Singleton should create TargetObj(13)...
out-lit: ctor TargetObj(13) successful
out-lit: calling a non-static method on the Singleton-Implementation
out-lit: .....TargetObj(13): data="*************", array[13]={0,1,2,3,4,5,6,7,8,9,10,11,12,}
out-lit: dtor ~TargetObj(13) successful
END
TEST "SingletonTestMock_test" SingletonTestMock_test <<END
out-lit: TestSingletonO::doIt() call=1
out-lit: TestSingletonO::doIt() call=2
out-lit: Mock_1::doIt() call=1
out-lit: Mock_1::doIt() call=2
out-lit: Mock_1::doIt() call=3
out-lit: Mock_1::doIt() call=4
out-lit: Mock_1::doIt() call=5
out-lit: Mock_2::doIt() call=1
out-lit: TestSingletonO::doIt() call=3
END
PLANNED "StreamTypeBasics_test" StreamTypeBasics_test <<END
END
PLANNED "StreamTypeLifecycle_test" StreamTypeLifecycle_test <<END
END
TEST "Multithread Locking by Monitor" SyncLocking_test <<END
return: 0
END
TEST "Multithread Locking whole class" SyncClasslock_test <<END
return: 0
END
TEST "Wrapper thread-local pointers" ThreadLocal_test <<END
return: 0
END
TEST "Thread-local diagnostic context" DiagnosticContext_test <<END
return: 0
END
TEST "Wait/Notify on Object Monitor" SyncWaiting_test <<END
return: 0
END
TEST "Create 20 Threads passing context" ThreadWrapper_test <<END
return: 0
END
TEST "Waiting on Thread termination" ThreadWrapperJoin_test <<END
return: 0
END
TEST "Starting and stopping subsystems" SubsystemRunner_test <<END
out: -----singleSubsys_complete_cycle-----
out: -----singleSubsys_start_failure-----
out: -----singleSubsys_emegency_exit-----
out: -----dependentSubsys_complete_cycle-----
out: -----dependentSubsys_start_failure-----
return: 0
END
TEST "Lumiera Time Wrapper" TimeBasics_test <<END
out: .?.:..:..\....
return: 0
END
TEST "Times and time intervals" TimeValue_test <<END
return: 0
END
PLANNED "Time Quantisation" TimeQuantisation_test <<END
return: 0
END
TEST "Changing time specifications" TimeMutation_test <<END
return: 0
END
TEST "Life changing time specifications with feedback" TimeControl_test <<END
out: Test-Case. Target=.+time.Duration. <--feed--- .+time.TimeValue.$
out: Test-Case. Target=.+time.Duration. <--feed--- .+time.Time.$
out: Test-Case. Target=.+time.Duration. <--feed--- .+time.Duration.$
out: Test-Case. Target=.+time.Duration. <--feed--- .+time.TimeSpan.$
out: Test-Case. Target=.+time.Duration. <--feed--- .+time.QuTime.$
out: Test-Case. Target=.+time.TimeSpan. <--feed--- .+time.TimeValue.$
out: Test-Case. Target=.+time.TimeSpan. <--feed--- .+time.Time.$
out: Test-Case. Target=.+time.TimeSpan. <--feed--- .+time.Duration.$
out: Test-Case. Target=.+time.TimeSpan. <--feed--- .+time.TimeSpan.$
out: Test-Case. Target=.+time.TimeSpan. <--feed--- .+time.QuTime.$
out: Test-Case. Target=.+time.QuTime. <--feed--- .+time.TimeValue.$
out: Test-Case. Target=.+time.QuTime. <--feed--- .+time.Time.$
out: Test-Case. Target=.+time.QuTime. <--feed--- .+time.Duration.$
out: Test-Case. Target=.+time.QuTime. <--feed--- .+time.TimeSpan.$
out: Test-Case. Target=.+time.QuTime. <--feed--- .+time.QuTime.$
return: 0
END
TEST "Quantiser API basics" QuantiserBasics_test <<END
return: 0
END
TEST "Defining Suppport for specific timecode formats" FormatSupport_test <<END
return: 0
END
TEST "Time formats and timecodes" TimeFormats_test <<END
out: Framecount=".+#" time = .+:..:..
out: SMPTE=".+:..:..:.." time = .+:..:..
out-lit: ----SMPTE-----
out-lit: SMPTE=" 5:42:23:13" time = 5:42:23.520
return: 0
END
TEST "Parsing time values" TimeParsing_test <<END
END
TEST "Symbol_test" Symbol_test <<END
out: one
out: sizeof.+lib.Literal.+ = (4|8)
out: Ss
out: one\.\.\.\.one
return: 0
END
TEST "Hashtable with Symbol keys" SymbolHashtable_test <<END
return: 0
END
TEST "Test support functions" TestHelper_test <<END
out: [a-z0-9]{80}$
out: Displaying types and sizes....
out: sizeof..theUniverse.+ = 42
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
END
TEST "Variadic template diagnostics" TestHelperVariadic_test <<END
out-lit: --no-arg--
out-lit: :.
@ -849,42 +312,6 @@ out-lit: :.
END
TEST "TestOption_test" 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
TEST "TypeList_test" TypeList_test <<END
out: - 1 -- 2 -- 3 -- 5 -- 8 -- 13 -- The End -
out: ..Size of = 1
@ -1238,147 +665,11 @@ return: 0
END
TEST "custom allocator(I)" SimpleAllocator_test <<END
return: 0
END
TEST "custom allocator(II)" TypedAllocationManager_test <<END
return: 0
END
TEST "Type-based contexts" TypedCounter_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 "integer rounding utility" UtilFloordiv_test <<END
return: 0
END
TEST "integer scale wrapping utility" UtilFloorwrap_test <<END
out-lit: --------i--------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: --------i--------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: --------l--------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: --------l--------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 "for-each operations" UtilForeach_test 10 <<END
out: ---:check_foreach_plain
out: :10:9:8:7:6:5:4:3:2:1
@ -1479,40 +770,4 @@ out: :0:1$
END
TEST "collection utils" UtilCollection_test <<END
return: 0
END
TEST "VectorTransfer_test" VectorTransfer_test <<END
return: 0
END
TEST "VisitingTool_test" VisitingTool_test <<END
out: === Babbler meets Boss and BigBoss ===
out: Hello Boss, nice to meet you...
out: Hello Big Boss, nice to meet you...
out: === Babbler meets HomoSapiens and Leader ===
out: Hello Boss, nice to meet you...
return: 0
END
TEST "VisitingToolExtended_test" VisitingToolExtended_test <<END
out: === Babbler meets Boss and BigBoss ===
out: Hello Boss, nice to meet you...
out: Hello Big Boss, nice to meet you...
out: === Babbler meets HomoSapiens and Leader ===
out: Hello Boss, nice to meet you...
out: === Blatherer meets Leader and Visionary masqueraded as Chief ===
out: we-do-everything-for-YOU!
out: Hello Mr.Future, nice to meet you...
out: === Babbler masqueraded as Tool meets Leader and Visionary masqueraded as HomoSapiens ===
out: Hello Boss, nice to meet you...
out: === Babbler masqueraded as Tool meets Leader and Visionary masqueraded as Leader ===
out: Hello Boss, nice to meet you...
return: 0
END

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ from Buildhelper import scanSubtree
from Buildhelper import globRootdirs
from Buildhelper import createPlugins
Import('env core_lib app_lib backend_lib tools config')
Import('env core_lib app_lib backend_lib gui tools config')
env = env.Clone()
env.Append(CPPPATH='include') # additional headers for tests
@ -51,7 +51,7 @@ def testCases(env,dir):
testlib = []
testClasses = list(scanSubtree(dir,['*.cpp']))
if testClasses:
testlib = sharedTestLibs[dir] = env.SharedLibrary('test-'+dir, testClasses, addLibs=core_lib) ### TICKET #938 : should be: addLibs=linkContext(dir))
testlib = sharedTestLibs[dir] = env.SharedLibrary('test-'+dir, testClasses, addLibs=linkContext(dir)) # note: linking dependencies according to application layers
# pick up standalone plain-C tests
standaloneTests = list(scanSubtree(dir,['test-*.c']))
@ -64,7 +64,7 @@ def testCases(env,dir):
# Specific linker treatment for the testsuite:
# force explicit linking against all dependencies to ensure auto-registration of
# any test-class on startup, even if no code dependency is visible to the linker
# any test-class on startup, even if no code dependency is visible for the linker
envSuite = env.Clone()
envSuite.Append(LINKFLAGS='-Wl,--no-as-needed')