| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_TESTS_TEST_CASE_H_ | 5 #ifndef PPAPI_TESTS_TEST_CASE_H_ |
| 6 #define PPAPI_TESTS_TEST_CASE_H_ | 6 #define PPAPI_TESTS_TEST_CASE_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
| 13 #include "ppapi/c/dev/ppb_testing_dev.h" |
| 13 #include "ppapi/cpp/dev/scrollbar_dev.h" | 14 #include "ppapi/cpp/dev/scrollbar_dev.h" |
| 14 | 15 |
| 15 #if (defined __native_client__) | 16 #if (defined __native_client__) |
| 16 #include "ppapi/cpp/var.h" | 17 #include "ppapi/cpp/var.h" |
| 17 #else | 18 #else |
| 18 #include "ppapi/cpp/private/var_private.h" | 19 #include "ppapi/cpp/private/var_private.h" |
| 19 #endif | 20 #endif |
| 20 | 21 |
| 21 struct PPB_Testing_Dev; | |
| 22 class TestingInstance; | 22 class TestingInstance; |
| 23 | 23 |
| 24 namespace pp { | 24 namespace pp { |
| 25 namespace deprecated { | 25 namespace deprecated { |
| 26 class ScriptableObject; | 26 class ScriptableObject; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 // Individual classes of tests derive from this generic test case. | 30 // Individual classes of tests derive from this generic test case. |
| 31 class TestCase { | 31 class TestCase { |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 #define ASSERT_FALSE(cmd) ASSERT_TRUE(!(cmd)) | 191 #define ASSERT_FALSE(cmd) ASSERT_TRUE(!(cmd)) |
| 192 #define ASSERT_EQ(a, b) ASSERT_TRUE((a) == (b)) | 192 #define ASSERT_EQ(a, b) ASSERT_TRUE((a) == (b)) |
| 193 #define ASSERT_NE(a, b) ASSERT_TRUE((a) != (b)) | 193 #define ASSERT_NE(a, b) ASSERT_TRUE((a) != (b)) |
| 194 | 194 |
| 195 #define ASSERT_DOUBLE_EQ(a, b) ASSERT_TRUE( \ | 195 #define ASSERT_DOUBLE_EQ(a, b) ASSERT_TRUE( \ |
| 196 std::fabs((a)-(b)) <= std::numeric_limits<double>::epsilon()) | 196 std::fabs((a)-(b)) <= std::numeric_limits<double>::epsilon()) |
| 197 | 197 |
| 198 #define PASS() return std::string() | 198 #define PASS() return std::string() |
| 199 | 199 |
| 200 #endif // PPAPI_TESTS_TEST_CASE_H_ | 200 #endif // PPAPI_TESTS_TEST_CASE_H_ |
| OLD | NEW |