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

Unified Diff: base/win/scoped_bstr_unittest.cc

Issue 3781009: Move the windows-specific scoped_* stuff from base to base/win and in the bas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: base/win/scoped_bstr_unittest.cc
===================================================================
--- base/win/scoped_bstr_unittest.cc (revision 62694)
+++ base/win/scoped_bstr_unittest.cc (working copy)
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/scoped_bstr_win.h"
+#include "base/win/scoped_bstr.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace base {
+namespace win {
+
namespace {
static const wchar_t kTestString1[] = L"123";
@@ -70,24 +73,5 @@
BasicBstrTests();
}
-#define kSourceStr L"this is a string"
-#define kSourceStrEmpty L""
-
-TEST(StackBstrTest, StackBstr) {
- ScopedBstr system_bstr(kSourceStr);
- StackBstrVar(kSourceStr, stack_bstr);
- EXPECT_EQ(VARCMP_EQ,
- VarBstrCmp(system_bstr, stack_bstr, LOCALE_USER_DEFAULT, 0));
-
- StackBstrVar(kSourceStrEmpty, empty);
- UINT l1 = SysStringLen(stack_bstr);
- UINT l2 = SysStringLen(StackBstr(kSourceStr));
- UINT l3 = SysStringLen(system_bstr);
- EXPECT_EQ(l1, l2);
- EXPECT_EQ(l2, l3);
- EXPECT_EQ(0, SysStringLen(empty));
-
- const wchar_t one_more_test[] = L"this is my const string";
- EXPECT_EQ(SysStringLen(StackBstr(one_more_test)),
- lstrlen(one_more_test));
-}
+} // namespace win
+} // namespace base
« no previous file with comments | « base/win/scoped_bstr.cc ('k') | base/win/scoped_comptr.h » ('j') | base/win/scoped_comptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698