Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: test/ConsoleJsObject.cpp

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: fix including of <memory> Created Aug. 7, 2015, 6:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/BaseJsTest.h ('k') | test/DefaultFileSystem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 17 matching lines...) Expand all
28 28
29 void operator()(AdblockPlus::LogSystem::LogLevel logLevel, 29 void operator()(AdblockPlus::LogSystem::LogLevel logLevel,
30 const std::string& message, const std::string& source) 30 const std::string& message, const std::string& source)
31 { 31 {
32 lastLogLevel = logLevel; 32 lastLogLevel = logLevel;
33 lastMessage = message; 33 lastMessage = message;
34 lastSource = source; 34 lastSource = source;
35 } 35 }
36 }; 36 };
37 37
38 typedef std::tr1::shared_ptr<MockLogSystem> MockLogSystemPtr; 38 typedef std::shared_ptr<MockLogSystem> MockLogSystemPtr;
39 39
40 class ConsoleJsObjectTest : public BaseJsTest 40 class ConsoleJsObjectTest : public BaseJsTest
41 { 41 {
42 protected: 42 protected:
43 MockLogSystemPtr mockLogSystem; 43 MockLogSystemPtr mockLogSystem;
44 44
45 void SetUp() 45 void SetUp()
46 { 46 {
47 BaseJsTest::SetUp(); 47 BaseJsTest::SetUp();
48 mockLogSystem = MockLogSystemPtr(new MockLogSystem); 48 mockLogSystem = MockLogSystemPtr(new MockLogSystem);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 })();\n\ 101 })();\n\
102 }\n\ 102 }\n\
103 foo();", "eval"); 103 foo();", "eval");
104 ASSERT_EQ(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, mockLogSystem->lastLogLevel ); 104 ASSERT_EQ(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, mockLogSystem->lastLogLevel );
105 ASSERT_EQ("\ 105 ASSERT_EQ("\
106 1: /* anonymous */() at eval:5\n\ 106 1: /* anonymous */() at eval:5\n\
107 2: foo() at eval:6\n\ 107 2: foo() at eval:6\n\
108 3: /* anonymous */() at eval:8\n", mockLogSystem->lastMessage); 108 3: /* anonymous */() at eval:8\n", mockLogSystem->lastMessage);
109 ASSERT_EQ("", mockLogSystem->lastSource); 109 ASSERT_EQ("", mockLogSystem->lastSource);
110 } 110 }
OLDNEW
« no previous file with comments | « test/BaseJsTest.h ('k') | test/DefaultFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld