~s-cecilio/lenmus/v5.3

« back to all changes in this revision

Viewing changes to packages/UnitTest++/src/tests/TestCurrentTest.cpp

  • Committer: cecilios
  • Date: 2012-09-11 16:59:18 UTC
  • Revision ID: svn-v4:2587a929-2f0e-0410-ae78-fe6f687d5efe:branches/TRY-5.0:730
Paths: fixed problem with installation folders. Fixed Chinese ISO language code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "../UnitTest++.h"
 
2
#include "../CurrentTest.h"
 
3
#include "ScopedCurrentTest.h"
 
4
 
 
5
namespace 
 
6
{
 
7
 
 
8
TEST(CanSetandGetDetails)
 
9
{
 
10
        bool ok = false;
 
11
        {
 
12
                ScopedCurrentTest scopedTest;
 
13
 
 
14
                const UnitTest::TestDetails* details = reinterpret_cast< const UnitTest::TestDetails* >(12345);
 
15
                UnitTest::CurrentTest::Details() = details;
 
16
 
 
17
                ok = (UnitTest::CurrentTest::Details() == details);
 
18
        }
 
19
 
 
20
        CHECK(ok);
 
21
}
 
22
 
 
23
TEST(CanSetAndGetResults)
 
24
{
 
25
        bool ok = false;
 
26
        {
 
27
                ScopedCurrentTest scopedTest;
 
28
 
 
29
                UnitTest::TestResults results;
 
30
                UnitTest::CurrentTest::Results() = &results;
 
31
 
 
32
                ok = (UnitTest::CurrentTest::Results() == &results);
 
33
        }
 
34
 
 
35
        CHECK(ok);
 
36
}
 
37
 
 
38
}