-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
164 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2014 Eran Pe'er. | ||
* | ||
* This program is made available under the terms of the MIT License. | ||
* | ||
* Created on Mar 10, 2014 | ||
*/ | ||
|
||
#ifndef DefaultLogger_h__ | ||
#define DefaultLogger_h__ | ||
|
||
#include "fakeit/Logger.hpp" | ||
|
||
namespace fakeit { | ||
|
||
struct DefaultLogger: public fakeit::Logger { | ||
|
||
virtual void log(UnexpectedMethodCallException& e) override { | ||
} | ||
|
||
virtual void log(SequenceVerificationException& e) override { | ||
} | ||
|
||
virtual void log(NoMoreInvocationsVerificationException& e) override { | ||
} | ||
|
||
}; | ||
} | ||
|
||
#endif //Logger_h__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2014 Eran Pe'er. | ||
* | ||
* This program is made available under the terms of the MIT License. | ||
* | ||
* Created on Mar 10, 2014 | ||
*/ | ||
|
||
#ifndef FakeIt_h__ | ||
#define FakeIt_h__ | ||
|
||
#include "fakeit/DefaultLogger.hpp" | ||
|
||
namespace fakeit { | ||
|
||
struct FakeIt { | ||
|
||
static void log(UnexpectedMethodCallException& e){ | ||
getLogger().log(e); | ||
} | ||
|
||
static void log(SequenceVerificationException& e){ | ||
getLogger().log(e); | ||
} | ||
|
||
static void log(NoMoreInvocationsVerificationException& e){ | ||
getLogger().log(e); | ||
} | ||
|
||
static Logger& getLogger(){ | ||
static DefaultLogger logger; | ||
return logger; | ||
} | ||
}; | ||
|
||
} | ||
|
||
|
||
#endif // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2014 Eran Pe'er. | ||
* | ||
* This program is made available under the terms of the MIT License. | ||
* | ||
* Created on Mar 10, 2014 | ||
*/ | ||
|
||
#ifndef Logger_h__ | ||
#define Logger_h__ | ||
|
||
#include "fakeit/FakeitExceptions.hpp" | ||
|
||
namespace fakeit { | ||
|
||
struct Logger { | ||
virtual ~Logger() = default; | ||
|
||
virtual void log(UnexpectedMethodCallException& e) = 0; | ||
|
||
virtual void log(SequenceVerificationException& e) = 0; | ||
|
||
virtual void log(NoMoreInvocationsVerificationException& e) = 0; | ||
|
||
}; | ||
} | ||
#endif //Logger_h__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.