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

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

Issue 984353002: Makes declared_arguments per toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 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 unified diff | Download patch
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 "tools/gn/args.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "tools/gn/scheduler.h"
9 #include "tools/gn/test_with_scope.h"
10
11 TEST(ArgsTest, DeclareArgsMultipleTimes) {
12 TestWithScope setup1, setup2;
13 Args args;
14 Scope::KeyValueMap key_value_map1;
15 Err err;
16 LiteralNode assignment1;
17
18 setup1.scope()->SetValue("a", Value(nullptr, true), &assignment1);
19 setup1.scope()->GetCurrentScopeValues(&key_value_map1);
20 EXPECT_TRUE(args.DeclareArgs(key_value_map1, setup1.scope(), &err));
21
22 LiteralNode assignment2;
23 setup2.scope()->SetValue("a", Value(nullptr, true), &assignment2);
24 Scope::KeyValueMap key_value_map2;
25 setup2.scope()->GetCurrentScopeValues(&key_value_map2);
26 EXPECT_TRUE(args.DeclareArgs(key_value_map2, setup2.scope(), &err));
27 }
OLDNEW
« tools/gn/args.cc ('K') | « tools/gn/args.cc ('k') | tools/gn/config_values_extractors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698