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

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: Remove unused static function Created 4 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/function_get_path_info.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 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"));
-
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"));
+}
+
TEST_F(GetLabelInfoTest, LabelNoToolchain) {
EXPECT_EQ("//src/foo:name", Call(":name", "label_no_toolchain"));
EXPECT_EQ("//src/foo:name",
« no previous file with comments | « tools/gn/function_get_label_info.cc ('k') | tools/gn/function_get_path_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698