OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "tools/gn/functions.h" | 6 #include "tools/gn/functions.h" |
7 #include "tools/gn/test_with_scope.h" | 7 #include "tools/gn/test_with_scope.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 TEST_F(GetPathInfoTest, GenDir) { | 107 TEST_F(GetPathInfoTest, GenDir) { |
108 EXPECT_EQ("//out/Debug/gen/src/foo/foo", Call("foo/bar.txt", "gen_dir")); | 108 EXPECT_EQ("//out/Debug/gen/src/foo/foo", Call("foo/bar.txt", "gen_dir")); |
109 EXPECT_EQ("//out/Debug/gen/src/foo/bar", Call("bar/", "gen_dir")); | 109 EXPECT_EQ("//out/Debug/gen/src/foo/bar", Call("bar/", "gen_dir")); |
110 EXPECT_EQ("//out/Debug/gen/src/foo", Call(".", "gen_dir")); | 110 EXPECT_EQ("//out/Debug/gen/src/foo", Call(".", "gen_dir")); |
111 EXPECT_EQ("//out/Debug/gen/src/foo", Call("bar", "gen_dir")); | 111 EXPECT_EQ("//out/Debug/gen/src/foo", Call("bar", "gen_dir")); |
112 EXPECT_EQ("//out/Debug/gen/foo", Call("//foo/bar.txt", "gen_dir")); | 112 EXPECT_EQ("//out/Debug/gen/foo", Call("//foo/bar.txt", "gen_dir")); |
113 // System paths go into the ABS_PATH gen directory | 113 // System paths go into the ABS_PATH gen directory |
114 EXPECT_EQ("//out/Debug/gen/ABS_PATH/foo", Call("/foo/bar.txt", "gen_dir")); | 114 EXPECT_EQ("//out/Debug/gen/ABS_PATH/foo", Call("/foo/bar.txt", "gen_dir")); |
115 #if defined(OS_WIN) | 115 #if defined(OS_WIN) |
116 EXPECT_EQ("//out/Debug/gen/ABS_PATH/C/foo", | 116 EXPECT_EQ("//out/Debug/gen/ABS_PATH/C/foo", |
117 Call("/C:/foo/bar.txt", "out_dir")); | 117 Call("/C:/foo/bar.txt", "gen_dir")); |
118 #endif | 118 #endif |
119 } | 119 } |
OLD | NEW |