OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 #include "bin/directory.h" | 5 #include "bin/directory.h" |
6 #include "include/dart_api.h" | 6 #include "include/dart_api.h" |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
9 #include "vm/thread.h" | 9 #include "vm/thread.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 UNIT_TEST_CASE(DirectoryCurrentNoScope) { | 14 VM_UNIT_TEST_CASE(DirectoryCurrentNoScope) { |
15 char* current_dir = dart::bin::Directory::CurrentNoScope(); | 15 char* current_dir = dart::bin::Directory::CurrentNoScope(); |
16 EXPECT_NOTNULL(current_dir); | 16 EXPECT_NOTNULL(current_dir); |
17 free(current_dir); | 17 free(current_dir); |
18 } | 18 } |
19 | 19 |
20 | 20 |
21 TEST_CASE(DirectoryCurrent) { | 21 TEST_CASE(DirectoryCurrent) { |
22 const char* current = dart::bin::Directory::Current(); | 22 const char* current = dart::bin::Directory::Current(); |
23 EXPECT_NOTNULL(current); | 23 EXPECT_NOTNULL(current); |
24 } | 24 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 r = dart::bin::Directory::Exists(name); | 142 r = dart::bin::Directory::Exists(name); |
143 EXPECT_EQ(dart::bin::Directory::DOES_NOT_EXIST, r); | 143 EXPECT_EQ(dart::bin::Directory::DOES_NOT_EXIST, r); |
144 | 144 |
145 EXPECT(dart::bin::Directory::Delete(new_name, false)); | 145 EXPECT(dart::bin::Directory::Delete(new_name, false)); |
146 delete[] name; | 146 delete[] name; |
147 delete[] new_name; | 147 delete[] new_name; |
148 } | 148 } |
149 | 149 |
150 } // namespace dart | 150 } // namespace dart |
OLD | NEW |