Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3ab938a6
authored
Feb 02, 2015
by
Tobias Fuchs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_c, base_cpp, containers: fixed inconsistent naming of unit test cases
parent
3c5892ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
41 deletions
+61
-41
base_c/test/main.cc
+21
-10
base_cpp/test/main.cc
+17
-8
containers_cpp/test/main.cc
+23
-23
No files found.
base_c/test/main.cc
View file @
3ab938a6
...
@@ -41,22 +41,33 @@
...
@@ -41,22 +41,33 @@
#include <embb/base/c/memory_allocation.h>
#include <embb/base/c/memory_allocation.h>
using
embb
::
base
::
test
::
AllocTest
;
using
embb
::
base
::
test
::
DurationTest
;
using
embb
::
base
::
test
::
TimeTest
;
using
embb
::
base
::
test
::
CounterTest
;
using
embb
::
base
::
test
::
MutexTest
;
using
embb
::
base
::
test
::
ThreadIndexTest
;
using
embb
::
base
::
test
::
CoreSetTest
;
using
embb
::
base
::
test
::
ConditionVarTest
;
using
embb
::
base
::
test
::
ThreadTest
;
using
embb
::
base
::
test
::
ThreadSpecificStorageTest
;
PT_MAIN
(
"Base C"
)
{
PT_MAIN
(
"Base C"
)
{
embb_log_set_log_level
(
EMBB_LOG_LEVEL_WARNING
);
embb_log_set_log_level
(
EMBB_LOG_LEVEL_WARNING
);
unsigned
int
max_threads
=
unsigned
int
max_threads
=
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
embb_thread_set_max_count
(
max_threads
);
embb_thread_set_max_count
(
max_threads
);
PT_RUN
(
embb
::
base
::
test
::
AllocTest
);
PT_RUN
(
AllocTest
);
PT_RUN
(
embb
::
base
::
test
::
DurationTest
);
PT_RUN
(
DurationTest
);
PT_RUN
(
embb
::
base
::
test
::
TimeTest
);
PT_RUN
(
TimeTest
);
PT_RUN
(
embb
::
base
::
test
::
CounterTest
);
PT_RUN
(
CounterTest
);
PT_RUN
(
embb
::
base
::
test
::
MutexTest
);
PT_RUN
(
MutexTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadIndexTest
);
PT_RUN
(
ThreadIndexTest
);
PT_RUN
(
embb
::
base
::
test
::
CoreSetTest
);
PT_RUN
(
CoreSetTest
);
PT_RUN
(
embb
::
base
::
test
::
ConditionVarTest
);
PT_RUN
(
ConditionVarTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadTest
);
PT_RUN
(
ThreadTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadSpecificStorageTest
);
PT_RUN
(
ThreadSpecificStorageTest
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
base_cpp/test/main.cc
View file @
3ab938a6
...
@@ -37,18 +37,27 @@
...
@@ -37,18 +37,27 @@
#include <embb/base/c/memory_allocation.h>
#include <embb/base/c/memory_allocation.h>
using
embb
::
base
::
test
::
CoreSetTest
;
using
embb
::
base
::
test
::
DurationTest
;
using
embb
::
base
::
test
::
ConditionVarTest
;
using
embb
::
base
::
test
::
MutexTest
;
using
embb
::
base
::
test
::
ThreadSpecificStorageTest
;
using
embb
::
base
::
test
::
AtomicTest
;
using
embb
::
base
::
test
::
MemoryAllocationTest
;
using
embb
::
base
::
test
::
ThreadTest
;
PT_MAIN
(
"Base C++"
)
{
PT_MAIN
(
"Base C++"
)
{
unsigned
int
max_threads
=
unsigned
int
max_threads
=
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
embb_thread_set_max_count
(
max_threads
);
embb_thread_set_max_count
(
max_threads
);
PT_RUN
(
embb
::
base
::
test
::
CoreSetTest
);
PT_RUN
(
CoreSetTest
);
PT_RUN
(
embb
::
base
::
test
::
DurationTest
);
PT_RUN
(
DurationTest
);
PT_RUN
(
embb
::
base
::
test
::
ConditionVarTest
);
PT_RUN
(
ConditionVarTest
);
PT_RUN
(
embb
::
base
::
test
::
MutexTest
);
PT_RUN
(
MutexTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadSpecificStorageTest
);
PT_RUN
(
ThreadSpecificStorageTest
);
PT_RUN
(
embb
::
base
::
test
::
AtomicTest
);
PT_RUN
(
AtomicTest
);
PT_RUN
(
embb
::
base
::
test
::
MemoryAllocationTest
);
PT_RUN
(
MemoryAllocationTest
);
PT_RUN
(
embb
::
base
::
test
::
ThreadTest
);
PT_RUN
(
ThreadTest
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
containers_cpp/test/main.cc
View file @
3ab938a6
...
@@ -43,33 +43,33 @@
...
@@ -43,33 +43,33 @@
#define COMMA ,
#define COMMA ,
using
embb
::
containers
::
WaitFreeArrayValuePool
;
using
embb
::
containers
::
LockFreeTreeValuePool
;
using
embb
::
containers
::
WaitFreeSPSCQueue
;
using
embb
::
containers
::
LockFreeMPMCQueue
;
using
embb
::
containers
::
LockFreeStack
;
using
embb
::
containers
::
LockFreeTreeValuePool
;
using
embb
::
containers
::
WaitFreeArrayValuePool
;
using
embb
::
containers
::
test
::
PoolTest
;
using
embb
::
containers
::
test
::
HazardPointerTest
;
using
embb
::
containers
::
test
::
QueueTest
;
using
embb
::
containers
::
test
::
StackTest
;
using
embb
::
containers
::
test
::
ObjectPoolTest
;
PT_MAIN
(
"Data Structures C++"
)
{
PT_MAIN
(
"Data Structures C++"
)
{
unsigned
int
max_threads
=
unsigned
int
max_threads
=
static_cast
<
unsigned
int
>
(
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
embb_thread_set_max_count
(
max_threads
);
embb_thread_set_max_count
(
max_threads
);
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
PT_RUN
(
PoolTest
<
WaitFreeArrayValuePool
<
int
COMMA
-
1
>
>
);
embb
::
containers
::
WaitFreeArrayValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
PoolTest
<
LockFreeTreeValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
PT_RUN
(
HazardPointerTest
);
embb
::
containers
::
LockFreeTreeValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
QueueTest
<
WaitFreeSPSCQueue
<
::
std
::
pair
<
size_t
COMMA
int
>
>
>
);
PT_RUN
(
QueueTest
<
LockFreeMPMCQueue
<
::
std
::
pair
<
size_t
COMMA
int
>
>
PT_RUN
(
embb
::
containers
::
test
::
HazardPointerTest
);
PT_RUN
(
embb
::
containers
::
test
::
QueueTest
<
embb
::
containers
::
WaitFreeSPSCQueue
<
::
std
::
pair
<
size_t
COMMA
int
>
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
QueueTest
<
embb
::
containers
::
LockFreeMPMCQueue
<
::
std
::
pair
<
size_t
COMMA
int
>
>
COMMA
true
COMMA
true
>
);
COMMA
true
COMMA
true
>
);
PT_RUN
(
StackTest
<
LockFreeStack
<
int
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
StackTest
<
PT_RUN
(
ObjectPoolTest
<
LockFreeTreeValuePool
<
bool
COMMA
false
>
>
);
embb
::
containers
::
LockFreeStack
<
int
>
>
);
PT_RUN
(
ObjectPoolTest
<
WaitFreeArrayValuePool
<
bool
COMMA
false
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
ObjectPoolTest
<
embb
::
containers
::
LockFreeTreeValuePool
<
bool
COMMA
false
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
ObjectPoolTest
<
embb
::
containers
::
WaitFreeArrayValuePool
<
bool
COMMA
false
>
>
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment