Case: DataSvc_ConstRef Component Author Date Version

POOL
Tim Barrass July-9-2003
1
Test Case Description

Tests the range of functionality provided by, and const-behaviour of const pool::Ref<T>.

Pre and Post Conditions

N/A

Input/Output Specifications

N/A

Test Procedure

Test output is configured to be filtered by oval.

Expected results

Significant test output is included below. In addition, the files ConstRef.root, ConstRef.coll and StressTestCatalog.xml will be created. These files are not required by future test runs and can be deleted.

...
[OVAL] ========== Ref Creation Tests ==========
[OVAL] Breaks build! (good) Create const Ref, try to modify transient
[OVAL] Breaks build! (good) Create const Ref, try to modify CONST transient
[OVAL] non-const data() query method called
[OVAL] PASSED Read from my object after someone else has created a Ref (using a copy constructor!)
[OVAL] const data() query method called
[OVAL] PASSED Read from my CONST object after someone else 'might' have Refd it
[OVAL] PASSED PASSED Check is_null method
...
[OVAL] PASSED Create a Ref from the externalised token string
[OVAL] PASSED Check token-as-string returned from Ref
[OVAL] PASSED Check token ptr returned from Ref
[OVAL] Check ptr to context returned from Ref (no longer applicable)
[OVAL] ========== Ref Copy Tests ==========
[OVAL] non-const data() query method called
[OVAL] non-const data() query method called
[OVAL] PASSED Creating new Ref via Copy Constructor
[OVAL] non-const data() query method called
[OVAL] non-const data() query method called
[OVAL] PASSED Creating new Ref via Assignment Operator
[OVAL] ========== Misc Operator Tests ==========
[OVAL] PASSED PASSED Check returned real pointer
[OVAL] PASSED PASSED Check ! operator
[OVAL] const data() query method called
[OVAL] PASSED Check star operator
[OVAL] ========== Misc Equality Tests ==========
[OVAL] PASSED PASSED Check Ref == Ref equality
[OVAL] PASSED PASSED Check Ref != Ref equality
[OVAL] PASSED Check Ref != Obj equality
[OVAL] PASSED Check Obj != Ref equality
[OVAL] ========== Misc Tests ==========
[OVAL] Check resetting of Ref context (no longer applicable)
[OVAL] TO DO !! Check Cache location query
...

Failure Recovery

Submit bug report to the POOL section of savannah.cern.ch specifiying the test name.

Comments

Planned updates:
- use implicit collections
- expand test to more completely cover possible Ref states.