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

Unified Diff: tools/gn/function_get_label_info_unittest.cc

Issue 1316653003: GN get_label_info support toolchains for target_out_dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/function_get_label_info.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_get_label_info_unittest.cc
diff --git a/tools/gn/function_get_label_info_unittest.cc b/tools/gn/function_get_label_info_unittest.cc
index 42fe2233688c33d93e5f59370ad03961ef32df35..ddec8302c9a79ab308e59c025b858303833e55fc 100644
--- a/tools/gn/function_get_label_info_unittest.cc
+++ b/tools/gn/function_get_label_info_unittest.cc
@@ -48,11 +48,13 @@ TEST_F(GetLabelInfoTest, BadInput) {
TEST_F(GetLabelInfoTest, Name) {
EXPECT_EQ("name", Call(":name", "name"));
EXPECT_EQ("name", Call("//foo/bar:name", "name"));
+ EXPECT_EQ("name", Call("//foo/bar:name(//other:tc)", "name"));
}
TEST_F(GetLabelInfoTest, Dir) {
EXPECT_EQ("//src/foo", Call(":name", "dir"));
EXPECT_EQ("//foo/bar", Call("//foo/bar:baz", "dir"));
+ EXPECT_EQ("//foo/bar", Call("//foo/bar:baz(//other:tc)", "dir"));
}
TEST_F(GetLabelInfoTest, RootOutDir) {
@@ -61,8 +63,10 @@ TEST_F(GetLabelInfoTest, RootOutDir) {
Call(":name(//toolchain:random)", "root_out_dir"));
}
-TEST_F(GetLabelInfoTest, RootGetDir) {
+TEST_F(GetLabelInfoTest, RootGenDir) {
EXPECT_EQ("//out/Debug/gen", Call(":name", "root_gen_dir"));
+ EXPECT_EQ("//out/Debug/gen",
+ Call(":name(//toolchain:default)", "root_gen_dir"));
EXPECT_EQ("//out/Debug/random/gen",
Call(":name(//toolchain:random)", "root_gen_dir"));
}
@@ -70,6 +74,11 @@ TEST_F(GetLabelInfoTest, RootGetDir) {
TEST_F(GetLabelInfoTest, TargetOutDir) {
EXPECT_EQ("//out/Debug/obj/src/foo", Call(":name", "target_out_dir"));
EXPECT_EQ("//out/Debug", Call(":name", "root_out_dir"));
+
+ EXPECT_EQ("//out/Debug/obj/foo",
+ Call("//foo:name(//toolchain:default)", "target_out_dir"));
+ EXPECT_EQ("//out/Debug/random/obj/foo",
+ Call("//foo:name(//toolchain:random)", "target_out_dir"));
}
TEST_F(GetLabelInfoTest, LabelNoToolchain) {
« no previous file with comments | « tools/gn/function_get_label_info.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698