Fix copyright lines
[folly.git] / folly / test / ConstexprMathTest.cpp
index a0f9b102331c7fa2ccb31d0debb71f0b1d999f20..c225852783288a5c247d2f21a046c8fc0037af17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -178,3 +178,18 @@ TEST_F(ConstexprMathTest, constexpr_ceil) {
     EXPECT_EQ(-20ll, rounded);
   }
 }
+
+TEST_F(ConstexprMathTest, constexpr_pow) {
+  {
+    constexpr auto a = folly::constexpr_pow(uint64_t(0), 15);
+    EXPECT_EQ(0, a);
+  }
+  {
+    constexpr auto a = folly::constexpr_pow(uint64_t(15), 0);
+    EXPECT_EQ(1, a);
+  }
+  {
+    constexpr auto a = folly::constexpr_pow(uint64_t(2), 6);
+    EXPECT_EQ(64, a);
+  }
+}