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

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

Issue 2428013002: Setting "SubSystem" option on "Link" page for Visual Studio project. (Closed)
Patch Set: Fixed missed space indent Created 4 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 | « tools/gn/visual_studio_utils.cc ('k') | tools/gn/visual_studio_writer.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/visual_studio_utils.h" 5 #include "tools/gn/visual_studio_utils.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ParseCompilerOption("/wd1234", &options); 85 ParseCompilerOption("/wd1234", &options);
86 ParseCompilerOption("/wd56", &options); 86 ParseCompilerOption("/wd56", &options);
87 ASSERT_EQ("1234;56;", options.disable_specific_warnings); 87 ASSERT_EQ("1234;56;", options.disable_specific_warnings);
88 88
89 CHECK(options.additional_options.empty()); 89 CHECK(options.additional_options.empty());
90 ParseCompilerOption("/MP", &options); 90 ParseCompilerOption("/MP", &options);
91 ParseCompilerOption("/bigobj", &options); 91 ParseCompilerOption("/bigobj", &options);
92 ParseCompilerOption("/Zc:sizedDealloc", &options); 92 ParseCompilerOption("/Zc:sizedDealloc", &options);
93 ASSERT_EQ("/MP /bigobj /Zc:sizedDealloc ", options.additional_options); 93 ASSERT_EQ("/MP /bigobj /Zc:sizedDealloc ", options.additional_options);
94 } 94 }
95
96 TEST(VisualStudioUtils, ParseLinkerOption) {
97 LinkerOptions options;
98 ParseLinkerOption("/SUBSYSTEM:CONSOLE,5.02h", &options);
99 ASSERT_EQ("CONSOLE", options.subsystem);
100
101 ParseLinkerOption("/SUBSYSTEM:WINDOWS", &options);
102 ASSERT_EQ("WINDOWS", options.subsystem);
103 }
OLDNEW
« no previous file with comments | « tools/gn/visual_studio_utils.cc ('k') | tools/gn/visual_studio_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698