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

Side by Side Diff: base/test/scoped_locale.cc

Issue 7129056: Cleanup in base/test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed base.gyp Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 <locale.h>
6
7 #include "base/test/scoped_locale.h"
Paweł Hajdan Jr. 2011/06/10 17:00:51 nit: This must always be the first header.
Joao da Silva 2011/06/14 16:48:44 Done.
8
9 namespace base {
10
11 ScopedSetLocale::ScopedSetLocale(const std::string& locale) {
12 prev_locale_ = setlocale(LC_ALL, NULL);
13 current_locale_ = setlocale(LC_ALL, locale.c_str());
Joao da Silva 2011/06/10 15:53:56 We can't do much in the ctor about it, so I've add
Paweł Hajdan Jr. 2011/06/10 17:00:51 I'd prefer using gtest's EXPECT_ macro and getting
Joao da Silva 2011/06/14 16:48:44 I tried that (see patch set 4), and it worked fine
Paweł Hajdan Jr. 2011/06/14 20:20:07 Can we get the locale installed on the bots? The p
Joao da Silva 2011/06/15 10:15:13 I'll try to get the locale on the linux bots. Not
Paweł Hajdan Jr. 2011/06/16 10:33:27 Thanks, I've noticed the bug - sounds good.
Joao da Silva 2011/06/16 11:12:18 It's not clear to me what you mean here. Did you m
Paweł Hajdan Jr. 2011/06/16 11:46:19 Sorry, I think I meant 3. actually use EXPECT_TRU
14 }
15
16 ScopedSetLocale::~ScopedSetLocale() {
17 setlocale(LC_ALL, prev_locale_);
18 }
19
20 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698