add Synchronized::withLock() methods
[folly.git] / folly / test / SpookyHashV2Test.cpp
index eaa27ace8c51a2ea437d2d9d5193ef501690ef2f..c370c9e67c884d482196813eea7b2f8bf0e8de37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@
 #include <cstdlib>
 #include <ctime>
 
+#include <gtest/gtest.h>
+
 using namespace ::folly::hash;
 
 static bool failed = false;
@@ -522,16 +524,15 @@ void TestPieces()
 }
 #undef BUFSIZE
 
-int main(int argc, const char **argv)
-{
+TEST(SpookyHashV2, Main) {
     TestResults();
     TestAlignment();
     TestPieces();
-    DoTimingBig(argc);
+    DoTimingBig(1);
     // tudorb@fb.com: Commented out slow tests
 #if 0
     DoTimingSmall(argc);
     TestDeltas(argc);
 #endif
-    return failed;
+    CHECK_EQ(failed, 0);
 }