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

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

Issue 1214933007: Normalize paths in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually "git add" the test file. Created 5 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/source_file.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/gn/source_file.h"
7
8 // The SourceFile object should normalize the input passed to the constructor.
9 // The normalizer unit test checks for all the weird edge cases for normalizing
10 // so here just check that it gets called.
11 TEST(SourceFile, Normalize) {
12 SourceFile a("//foo/../bar.cc");
13 EXPECT_EQ("//bar.cc", a.value());
14
15 std::string b_str("//foo/././../bar.cc");
16 SourceFile b(SourceFile::SwapIn(), &b_str);
17 EXPECT_TRUE(b_str.empty()); // Should have been swapped in.
18 EXPECT_EQ("//bar.cc", b.value());
19 }
OLDNEW
« no previous file with comments | « tools/gn/source_file.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698