| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 #define ASSERT_FALSE(cmd) ASSERT_TRUE(!(cmd)) | 201 #define ASSERT_FALSE(cmd) ASSERT_TRUE(!(cmd)) |
| 202 #define ASSERT_EQ(a, b) ASSERT_TRUE((a) == (b)) | 202 #define ASSERT_EQ(a, b) ASSERT_TRUE((a) == (b)) |
| 203 #define ASSERT_NE(a, b) ASSERT_TRUE((a) != (b)) | 203 #define ASSERT_NE(a, b) ASSERT_TRUE((a) != (b)) |
| 204 | 204 |
| 205 #define ASSERT_DOUBLE_EQ(a, b) ASSERT_TRUE( \ | 205 #define ASSERT_DOUBLE_EQ(a, b) ASSERT_TRUE( \ |
| 206 std::fabs((a)-(b)) <= std::numeric_limits<double>::epsilon()) | 206 std::fabs((a)-(b)) <= std::numeric_limits<double>::epsilon()) |
| 207 | 207 |
| 208 #define PASS() return std::string() | 208 #define PASS() return std::string() |
| 209 | 209 |
| 210 #endif // PPAPI_TESTS_TEST_CASE_H_ | 210 #endif // PPAPI_TESTS_TEST_CASE_H_ |
| OLD | NEW |