summaryrefslogtreecommitdiff
path: root/AK/test.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-31 17:31:23 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-31 17:31:23 +0100
commitffab6897aa1bc668f98130b4bb485a4602509938 (patch)
treea4d1933fc390ea0803bb3826353262fbf06b885f /AK/test.cpp
parent27fa09aee492e6c8da9168d24f0b1d2c5d2162d5 (diff)
downloadserenity-ffab6897aa1bc668f98130b4bb485a4602509938.zip
Big, possibly complete sweep of naming changes.
Diffstat (limited to 'AK/test.cpp')
-rw-r--r--AK/test.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/AK/test.cpp b/AK/test.cpp
index 34ba3244be..761d817147 100644
--- a/AK/test.cpp
+++ b/AK/test.cpp
@@ -13,7 +13,7 @@
#include "FileSystemPath.h"
#include "Lock.h"
-static void testWeakPtr();
+static void test_weak_ptr();
void log_locked() { }
void log_unlocked() { }
@@ -223,7 +223,7 @@ int main(int c, char** v)
}
{
- auto printInts = [] (const Vector<int>& v) {
+ auto print_ints = [] (const Vector<int>& v) {
printf("Vector {\n size: %zu\n capacity: %zu\n elements: ", v.size(), v.capacity());
for (auto i : v)
printf("%d ", i);
@@ -235,23 +235,23 @@ int main(int c, char** v)
v.append(1);
v.append(2);
v.append(3);
- printInts(v);
+ print_ints(v);
v.remove(1);
- printInts(v);
+ print_ints(v);
v.remove(0);
- printInts(v);
+ print_ints(v);
v.remove(0);
- printInts(v);
+ print_ints(v);
v.remove(0);
- printInts(v);
+ print_ints(v);
}
{
- auto printInts = [] (const HashTable<int>& h) {
+ auto print_ints = [] (const HashTable<int>& h) {
printf("HashTable {\n size: %u\n capacity: %u\n elements: ", h.size(), h.capacity());
for (auto i : h)
printf("%d ", i);
@@ -268,17 +268,17 @@ int main(int c, char** v)
h.dump();
- printInts(h);
+ print_ints(h);
h.remove(30);
- printInts(h);
+ print_ints(h);
h.set(30);
h.remove(30);
- printInts(h);
+ print_ints(h);
}
- testWeakPtr();
+ test_weak_ptr();
return 0;
}
@@ -289,16 +289,16 @@ public:
~TestWeakable() { }
};
-void testWeakPtr()
+void test_weak_ptr()
{
auto* weakable = new TestWeakable;
- auto weakPtr = weakable->makeWeakPtr();
- ASSERT(weakPtr);
- ASSERT(weakPtr.ptr() == weakable);
+ auto weak_ptr = weakable->make_weak_ptr();
+ ASSERT(weak_ptr);
+ ASSERT(weak_ptr.ptr() == weakable);
delete weakable;
- ASSERT(!weakPtr);
- ASSERT(weakPtr.ptr() == nullptr);
+ ASSERT(!weak_ptr);
+ ASSERT(weak_ptr.ptr() == nullptr);
}