Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: runtime/bin/directory_test.cc

Issue 2281733002: Fix directory test on mac (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 EXPECT_NOTNULL(current); 63 EXPECT_NOTNULL(current);
64 64
65 const char* system_temp = dart::bin::Directory::SystemTemp(); 65 const char* system_temp = dart::bin::Directory::SystemTemp();
66 EXPECT_NOTNULL(system_temp); 66 EXPECT_NOTNULL(system_temp);
67 67
68 EXPECT(dart::bin::Directory::SetCurrent(system_temp)); 68 EXPECT(dart::bin::Directory::SetCurrent(system_temp));
69 69
70 const char* new_current = dart::bin::Directory::Current(); 70 const char* new_current = dart::bin::Directory::Current();
71 EXPECT_NOTNULL(new_current); 71 EXPECT_NOTNULL(new_current);
72 72
73 EXPECT_EQ(0, strcmp(system_temp, new_current)); 73 EXPECT_NOTNULL(strstr(new_current, system_temp));
74 74
75 EXPECT(dart::bin::Directory::SetCurrent(current)); 75 EXPECT(dart::bin::Directory::SetCurrent(current));
76 } 76 }
77 77
78 78
79 TEST_CASE(DirectoryCreateDelete) { 79 TEST_CASE(DirectoryCreateDelete) {
80 const char* kTempDirName = "test_name"; 80 const char* kTempDirName = "test_name";
81 81
82 const char* system_temp = dart::bin::Directory::SystemTemp(); 82 const char* system_temp = dart::bin::Directory::SystemTemp();
83 EXPECT_NOTNULL(system_temp); 83 EXPECT_NOTNULL(system_temp);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 r = dart::bin::Directory::Exists(name); 135 r = dart::bin::Directory::Exists(name);
136 EXPECT_EQ(dart::bin::Directory::DOES_NOT_EXIST, r); 136 EXPECT_EQ(dart::bin::Directory::DOES_NOT_EXIST, r);
137 137
138 EXPECT(dart::bin::Directory::Delete(new_name, false)); 138 EXPECT(dart::bin::Directory::Delete(new_name, false));
139 delete[] name; 139 delete[] name;
140 delete[] new_name; 140 delete[] new_name;
141 } 141 }
142 142
143 } // namespace dart 143 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698