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

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

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 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 unified diff | Download patch
« no previous file with comments | « tools/gn/ninja_build_writer_unittest.cc ('k') | tools/gn/ninja_copy_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "tools/gn/ninja_bundle_data_target_writer.h" 5 #include "tools/gn/ninja_bundle_data_target_writer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "tools/gn/target.h" 11 #include "tools/gn/target.h"
12 #include "tools/gn/test_with_scope.h" 12 #include "tools/gn/test_with_scope.h"
13 13
14 TEST(NinjaBundleDataTargetWriter, Run) { 14 TEST(NinjaBundleDataTargetWriter, Run) {
15 Err err; 15 Err err;
16 TestWithScope setup; 16 TestWithScope setup;
17 17
18 Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data")); 18 Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"), {});
19 bundle_data.set_output_type(Target::BUNDLE_DATA); 19 bundle_data.set_output_type(Target::BUNDLE_DATA);
20 bundle_data.sources().push_back(SourceFile("//foo/input1.txt")); 20 bundle_data.sources().push_back(SourceFile("//foo/input1.txt"));
21 bundle_data.sources().push_back(SourceFile("//foo/input2.txt")); 21 bundle_data.sources().push_back(SourceFile("//foo/input2.txt"));
22 bundle_data.sources().push_back( 22 bundle_data.sources().push_back(
23 SourceFile("//foo/Foo.xcassets/Contents.json")); 23 SourceFile("//foo/Foo.xcassets/Contents.json"));
24 bundle_data.sources().push_back( 24 bundle_data.sources().push_back(
25 SourceFile("//foo/Foo.xcassets/foo.imageset/Contents.json")); 25 SourceFile("//foo/Foo.xcassets/foo.imageset/Contents.json"));
26 bundle_data.sources().push_back( 26 bundle_data.sources().push_back(
27 SourceFile("//foo/Foo.xcassets/foo.imageset/FooIcon-29.png")); 27 SourceFile("//foo/Foo.xcassets/foo.imageset/FooIcon-29.png"));
28 bundle_data.sources().push_back( 28 bundle_data.sources().push_back(
(...skipping 15 matching lines...) Expand all
44 "../../foo/input1.txt " 44 "../../foo/input1.txt "
45 "../../foo/input2.txt " 45 "../../foo/input2.txt "
46 "../../foo/Foo.xcassets/Contents.json " 46 "../../foo/Foo.xcassets/Contents.json "
47 "../../foo/Foo.xcassets/foo.imageset/Contents.json " 47 "../../foo/Foo.xcassets/foo.imageset/Contents.json "
48 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29.png " 48 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29.png "
49 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@2x.png " 49 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@2x.png "
50 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@3x.png\n"; 50 "../../foo/Foo.xcassets/foo.imageset/FooIcon-29@3x.png\n";
51 std::string out_str = out.str(); 51 std::string out_str = out.str();
52 EXPECT_EQ(expected, out_str); 52 EXPECT_EQ(expected, out_str);
53 } 53 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_build_writer_unittest.cc ('k') | tools/gn/ninja_copy_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698