Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-19 10:47:56 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-06-19 10:47:56 +0400
commita6e58cd7613f93b77ee4910bb73b411a0f745fb7 (patch)
treedf6fa19d09397f850968d20a2641136dc28af3fe /tests
parent16d64a99b42171f201496a33f987fb687e3dabb1 (diff)
Use Blender codestyle, not Google's one!
Diffstat (limited to 'tests')
-rw-r--r--tests/gtests/guardedalloc/guardedalloc_alignment_test.cc44
1 files changed, 24 insertions, 20 deletions
diff --git a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc b/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
index 34c47738276..68b9be3b462 100644
--- a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
+++ b/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
@@ -6,42 +6,46 @@
namespace {
-void DoBasicAlignmentChecks(const int alignment) {
- int *foo, *bar;
+void DoBasicAlignmentChecks(const int alignment)
+{
+ int *foo, *bar;
- foo = (int *) MEM_mallocN_aligned(sizeof(int) * 10, alignment, "test");
- CHECK_ALIGNMENT(foo, alignment);
+ foo = (int *) MEM_mallocN_aligned(sizeof(int) * 10, alignment, "test");
+ CHECK_ALIGNMENT(foo, alignment);
- bar = (int *) MEM_dupallocN(foo);
- CHECK_ALIGNMENT(bar, alignment);
- MEM_freeN(bar);
+ bar = (int *) MEM_dupallocN(foo);
+ CHECK_ALIGNMENT(bar, alignment);
+ MEM_freeN(bar);
- foo = (int *) MEM_reallocN(foo, sizeof(int) * 5);
- CHECK_ALIGNMENT(foo, alignment);
+ foo = (int *) MEM_reallocN(foo, sizeof(int) * 5);
+ CHECK_ALIGNMENT(foo, alignment);
- foo = (int *) MEM_recallocN(foo, sizeof(int) * 5);
- CHECK_ALIGNMENT(foo, alignment);
+ foo = (int *) MEM_recallocN(foo, sizeof(int) * 5);
+ CHECK_ALIGNMENT(foo, alignment);
- MEM_freeN(foo);
+ MEM_freeN(foo);
}
} // namespace
-TEST(guardedalloc, LockfreeAlignedAlloc16) {
- DoBasicAlignmentChecks(16);
+TEST(guardedalloc, LockfreeAlignedAlloc16)
+{
+ DoBasicAlignmentChecks(16);
}
-TEST(guardedalloc, GuardedAlignedAlloc16) {
- MEM_use_guarded_allocator();
- DoBasicAlignmentChecks(16);
+TEST(guardedalloc, GuardedAlignedAlloc16)
+{
+ MEM_use_guarded_allocator();
+ DoBasicAlignmentChecks(16);
}
// On Apple we currently support 16 bit alignment only.
// Harmless for Blender, but would be nice to support
// eventually.
#ifndef __APPLE__
-TEST(guardedalloc, GuardedAlignedAlloc32) {
- MEM_use_guarded_allocator();
- DoBasicAlignmentChecks(16);
+TEST(guardedalloc, GuardedAlignedAlloc32)
+{
+ MEM_use_guarded_allocator();
+ DoBasicAlignmentChecks(16);
}
#endif