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

Side by Side Diff: base/android/linker/crazy_linker/src/crazy_linker_error_unittest.cpp

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename library Created 7 years, 3 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 (c) 2013 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 "crazy_linker_error.h"
6
7 #include <minitest/minitest.h>
8
9 namespace crazy {
10
11 TEST(Error, ConstructEmpty) {
12 Error error;
13 EXPECT_STREQ("", error.c_str());
14 }
15
16 TEST(Error, ConstructWithString) {
17 Error error("Foo Bar");
18 EXPECT_STREQ("Foo Bar", error.c_str());
19 }
20
21 TEST(Error, CopyConstructor) {
22 Error error("FooFoo");
23 Error error2(error);
24
25 EXPECT_STREQ("FooFoo", error2.c_str());
26 }
27
28 TEST(Error, Set) {
29 Error error;
30 error.Set("BarFoo");
31 EXPECT_STREQ("BarFoo", error.c_str());
32 error.Set("FooBar");
33 EXPECT_STREQ("FooBar", error.c_str());
34 }
35
36 TEST(Error, Append) {
37 Error error("Foo");
38 error.Append("Bar");
39 EXPECT_STREQ("FooBar", error.c_str());
40 }
41
42 TEST(Error, Format) {
43 Error error;
44 error.Format("%s %s!", "Hi", "Cowboy");
45 EXPECT_STREQ("Hi Cowboy!", error.c_str());
46 }
47
48 TEST(Error, AppendFormat) {
49 Error error("Hi");
50 error.AppendFormat(" there %s!", "Cowboy");
51 EXPECT_STREQ("Hi there Cowboy!", error.c_str());
52 }
53
54 } // namespace crazy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698