Use Blender codestyle, not Google's one!
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 19 Jun 2014 06:47:56 +0000 (12:47 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 19 Jun 2014 06:47:56 +0000 (12:47 +0600)
tests/gtests/guardedalloc/guardedalloc_alignment_test.cc

index 34c47738276b9f79f736343272548b06a8ac0198..68b9be3b462de8b933c602eb55b8e2f5cc2e165c 100644 (file)
@@ -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