-
Notifications
You must be signed in to change notification settings - Fork 3
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
9 changed files
with
97 additions
and
4 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 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 @@ | ||
ADD_TEST_ALL_FILES() |
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,13 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
|
||
#include "dbft2/dBFT2Context.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(dbft2dBFT2Context, InternalValue) { | ||
dBFT2Context dBft2Context(1, 2, 3, 4, 5); | ||
|
||
EXPECT_EQ(1, dBft2Context.v); | ||
} |
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,13 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
|
||
#include "dbft2/dBFT2Machine.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(dbft2dBFT2Machine, ToString) { | ||
dBFT2Machine d2Machine; | ||
|
||
EXPECT_EQ("Welcome to dBFT2Machine : { name = replicated_dBFT}", d2Machine.toString()); | ||
} |
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,13 @@ | ||
#include <memory> | ||
#include <gtest/gtest.h> | ||
|
||
#include "dbft2/dBFT2RPCMachine.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(dbft2dBFT2RPCMachine, ToString) { | ||
// dBFT2RPCMachine d2rpcMachine; | ||
|
||
// EXPECT_EQ("Welcome to dBFT2Machine : { name = replicated_dBFT}", d2rpcMachine.toString()); | ||
} |
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,17 @@ | ||
#include <thread> | ||
#include <gtest/gtest.h> | ||
|
||
#include "single/SingleTimerStateMachine.hpp" | ||
#include "replicated/MultiContext.hpp" | ||
#include "replicated/MachineContext.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(ReplicatedMachineContext, ToString) { | ||
MachineContext<int> machineContext( | ||
std::shared_ptr<int>(new int{1}), | ||
std::shared_ptr<SingleTimerStateMachine<MultiContext<int>>>(new SingleTimerStateMachine<MultiContext<int>>())); | ||
|
||
EXPECT_EQ("STSM {#id = 0;Timer='Timer {name=''}';States=[]}", machineContext.machine->toString()); | ||
} |
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,12 @@ | ||
#include <thread> | ||
#include <gtest/gtest.h> | ||
|
||
#include "timing/CountdownNotifyTimer.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(TimingClockNotifyTimer, ToString) { | ||
CountdownNotifyTimer clockNotifyTimer(1); | ||
EXPECT_EQ("CountdownNotifyTimer {name=''}", clockNotifyTimer.toString()); | ||
} |
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,12 @@ | ||
#include <thread> | ||
#include <gtest/gtest.h> | ||
|
||
#include "timing/CountdownTimer.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(TimingCountdownTimer, ToString) { | ||
CountdownTimer countdownTimer(1); | ||
EXPECT_EQ("CountdownTimer {name=''}", countdownTimer.toString()); | ||
} |
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,12 @@ | ||
#include <thread> | ||
#include <gtest/gtest.h> | ||
|
||
#include "timing/TimerDelayable.hpp" | ||
|
||
using namespace std; | ||
using namespace libbft; | ||
|
||
TEST(TimingTimerDelayable, ToString) { | ||
TimerDelayable timerDelayable; | ||
EXPECT_EQ("Timer {name=''}", timerDelayable.toString()); | ||
} |