OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_ASSERT_H_ | 5 #ifndef PLATFORM_ASSERT_H_ |
6 #define VM_ASSERT_H_ | 6 #define PLATFORM_ASSERT_H_ |
7 | 7 |
8 // TODO(5411406): include sstream for now, once we have a Utils::toString() | 8 // TODO(5411406): include sstream for now, once we have a Utils::toString() |
9 // implemented for all the primitive types we can replace the usage of | 9 // implemented for all the primitive types we can replace the usage of |
10 // sstream by Utils::toString() | 10 // sstream by Utils::toString() |
11 #if defined(TESTING) | 11 #if defined(TESTING) |
12 #include <sstream> | 12 #include <sstream> |
13 #include <string> | 13 #include <string> |
14 #endif | 14 #endif |
15 | 15 |
16 #include "vm/globals.h" | 16 #include "platform/globals.h" |
17 | 17 |
18 #if !defined(DEBUG) && !defined(NDEBUG) | 18 #if !defined(DEBUG) && !defined(NDEBUG) |
19 #error neither DEBUG nor NDEBUG defined | 19 #error neither DEBUG nor NDEBUG defined |
20 #elif defined(DEBUG) && defined(NDEBUG) | 20 #elif defined(DEBUG) && defined(NDEBUG) |
21 #error both DEBUG and NDEBUG defined | 21 #error both DEBUG and NDEBUG defined |
22 #endif | 22 #endif |
23 | 23 |
24 namespace dart { | 24 namespace dart { |
25 | 25 |
26 class DynamicAssertionHelper { | 26 class DynamicAssertionHelper { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 #define WARN(error) \ | 287 #define WARN(error) \ |
288 dart::Expect(__FILE__, __LINE__).Fail("%s", error) | 288 dart::Expect(__FILE__, __LINE__).Fail("%s", error) |
289 | 289 |
290 #define WARN1(format, p1) \ | 290 #define WARN1(format, p1) \ |
291 dart::Expect(__FILE__, __LINE__).Fail(format, (p1)) | 291 dart::Expect(__FILE__, __LINE__).Fail(format, (p1)) |
292 | 292 |
293 #define WARN2(format, p1, p2) \ | 293 #define WARN2(format, p1, p2) \ |
294 dart::Expect(__FILE__, __LINE__).Fail(format, (p1), (p2)) | 294 dart::Expect(__FILE__, __LINE__).Fail(format, (p1), (p2)) |
295 | 295 |
296 #endif // VM_ASSERT_H_ | 296 #endif // PLATFORM_ASSERT_H_ |
OLD | NEW |