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

Unified Diff: tools/gn/gyp_action_target_writer_unittest.cc

Issue 206813002: Remove GN GYP generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/gyp_action_target_writer.cc ('k') | tools/gn/gyp_binary_target_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/gyp_action_target_writer_unittest.cc
diff --git a/tools/gn/gyp_action_target_writer_unittest.cc b/tools/gn/gyp_action_target_writer_unittest.cc
deleted file mode 100644
index 14c2930e71e29d87333d56372d75ce6b87ccb98a..0000000000000000000000000000000000000000
--- a/tools/gn/gyp_action_target_writer_unittest.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "testing/gtest/include/gtest/gtest.h"
-#include "tools/gn/builder_record.h"
-#include "tools/gn/gyp_action_target_writer.h"
-#include "tools/gn/test_with_scope.h"
-
-TEST(GypActionTargetWriter, Run) {
- TestWithScope setup;
- setup.build_settings()->SetBuildDir(SourceDir("//out/Debug/"));
- scoped_ptr<Target> target(
- new Target(setup.settings(), Label(SourceDir("//foo/"), "bar")));
- target->set_output_type(Target::ACTION);
-
- target->sources().push_back(SourceFile("//foo/input1.txt"));
- target->sources().push_back(SourceFile("//foo/input2.txt"));
-
- target->action_values().outputs().push_back(
- SourceFile("//out/Debug/{{source_file_part}}.out"));
-
- BuilderRecord record(BuilderRecord::ITEM_TARGET, target->label());
- record.set_item(target.PassAs<Item>());
- GypTargetWriter::TargetGroup group;
- group.debug = &record;
-
- setup.settings()->set_target_os(Settings::WIN);
-
- std::ostringstream out;
- GypActionTargetWriter writer(group, setup.toolchain(),
- SourceDir("//out/gn_gyp/"), out);
- writer.Run();
-
- const char expected[] =
- " {\n"
- " 'target_name': 'bar',\n"
- " 'type': 'none',\n"
- " 'actions': [{\n"
- " 'action_name': 'bar action',\n"
- " 'action': [\n"
- " 'ninja',\n"
- " '-C', '../../out/Debug/obj/foo/bar_ninja',\n"
- " 'bar',\n"
- " ],\n"
- " 'inputs': [\n"
- " '../../foo/input1.txt',\n"
- " '../../foo/input2.txt',\n"
- " ],\n"
- " 'outputs': [\n"
- " '../../out/Debug/input1.txt.out',\n"
- " '../../out/Debug/input2.txt.out',\n"
- " ],\n"
- " }],\n"
- " },\n";
- std::string out_str = out.str();
- EXPECT_EQ(expected, out_str);
-}
« no previous file with comments | « tools/gn/gyp_action_target_writer.cc ('k') | tools/gn/gyp_binary_target_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698