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

Side by Side Diff: tools/gn/function_get_target_outputs_unittest.cc

Issue 1431323003: Remove obsolete OS handling in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | tools/gn/ninja_action_target_writer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/target.h" 7 #include "tools/gn/target.h"
8 #include "tools/gn/test_with_scope.h" 8 #include "tools/gn/test_with_scope.h"
9 9
10 namespace { 10 namespace {
11 11
12 class GetTargetOutputsTest : public testing::Test { 12 class GetTargetOutputsTest : public testing::Test {
13 public: 13 public:
14 GetTargetOutputsTest() { 14 GetTargetOutputsTest() {
15 // Want consistent target names so explicitly set platform.
16 setup_.settings()->set_target_os(Settings::LINUX);
17 setup_.scope()->set_item_collector(&items_); 15 setup_.scope()->set_item_collector(&items_);
18 } 16 }
19 17
20 Value GetTargetOutputs(const std::string& name, Err* err) { 18 Value GetTargetOutputs(const std::string& name, Err* err) {
21 FunctionCallNode function; 19 FunctionCallNode function;
22 std::vector<Value> args; 20 std::vector<Value> args;
23 args.push_back(Value(nullptr, name)); 21 args.push_back(Value(nullptr, name));
24 return functions::RunGetTargetOutputs(setup_.scope(), &function, args, err); 22 return functions::RunGetTargetOutputs(setup_.scope(), &function, args, err);
25 } 23 }
26 24
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 "//out/Debug/{{source_file_part}}.two"); 95 "//out/Debug/{{source_file_part}}.two");
98 96
99 items_.push_back(action); 97 items_.push_back(action);
100 98
101 Err err; 99 Err err;
102 Value result = GetTargetOutputs("//foo:bar", &err); 100 Value result = GetTargetOutputs("//foo:bar", &err);
103 ASSERT_FALSE(err.has_error()); 101 ASSERT_FALSE(err.has_error());
104 AssertTwoStringsEqual(result, "//out/Debug/file.txt.one", 102 AssertTwoStringsEqual(result, "//out/Debug/file.txt.one",
105 "//out/Debug/file.txt.two"); 103 "//out/Debug/file.txt.two");
106 } 104 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/ninja_action_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698