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

Unified Diff: tools/gn/function_get_label_info_unittest.cc

Issue 2198433004: Make get_label_info take into account the toolchain for target_gen_dir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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
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 ddec8302c9a79ab308e59c025b858303833e55fc..65e46d050e913456a95c32084a69a3e00230f855 100644
--- a/tools/gn/function_get_label_info_unittest.cc
+++ b/tools/gn/function_get_label_info_unittest.cc
@@ -73,14 +73,20 @@ TEST_F(GetLabelInfoTest, RootGenDir) {
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"));
brettw 2016/08/01 21:53:55 I don't know why this was here, the same thing is
-
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, TargetGenDir) {
+ EXPECT_EQ("//out/Debug/gen/src/foo", Call(":name", "target_gen_dir"));
+ EXPECT_EQ("//out/Debug/gen/foo",
+ Call("//foo:name(//toolchain:default)", "target_gen_dir"));
+ EXPECT_EQ("//out/Debug/random/gen/foo",
+ Call("//foo:name(//toolchain:random)", "target_gen_dir"));
brettw 2016/08/01 21:53:55 This is the test for the actual bug.
+}
+
TEST_F(GetLabelInfoTest, LabelNoToolchain) {
EXPECT_EQ("//src/foo:name", Call(":name", "label_no_toolchain"));
EXPECT_EQ("//src/foo:name",

Powered by Google App Engine
This is Rietveld 408576698