| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_UNIT_TEST_H_ | 5 #ifndef VM_UNIT_TEST_H_ |
| 6 #define VM_UNIT_TEST_H_ | 6 #define VM_UNIT_TEST_H_ |
| 7 | 7 |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if (!value) { \ | 514 if (!value) { \ |
| 515 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ | 515 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ |
| 516 #handle); \ | 516 #handle); \ |
| 517 } \ | 517 } \ |
| 518 } else { \ | 518 } else { \ |
| 519 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ | 519 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ |
| 520 #handle); \ | 520 #handle); \ |
| 521 } \ | 521 } \ |
| 522 } while (0) | 522 } while (0) |
| 523 | 523 |
| 524 |
| 525 // Elide a substring which starts with some prefix and ends with a ". |
| 526 // |
| 527 // This is used to remove non-deterministic or fragile substrings from |
| 528 // JSON output. |
| 529 // |
| 530 // For example: |
| 531 // |
| 532 // prefix = "classes" |
| 533 // in = "\"id\":\"classes/46\"" |
| 534 // |
| 535 // Yields: |
| 536 // |
| 537 // out = "\"id\":\"\"" |
| 538 // |
| 539 void ElideJSONSubstring(const char* prefix, const char* in, char* out); |
| 540 |
| 541 |
| 524 } // namespace dart | 542 } // namespace dart |
| 525 | 543 |
| 526 #endif // VM_UNIT_TEST_H_ | 544 #endif // VM_UNIT_TEST_H_ |
| OLD | NEW |