-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFooMain.cc
More file actions
35 lines (26 loc) · 819 Bytes
/
FooMain.cc
File metadata and controls
35 lines (26 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cstdlib>
#include <iostream>
#include <string>
#include "MockFoo.h"
using namespace seamless;
using namespace std;
using ::testing::Assign;
using ::testing::Eq;
using ::testing::Ge;
using ::testing::Return;
int main(int argc, char** argv) {
::testing::InitGoogleMock(&argc, argv);
string value = "Hello World!";
MockFoo mockFoo;
EXPECT_CALL(mockFoo, setValue(testing::_));
mockFoo.setValue(value);
// make a mistake deliberately
EXPECT_CALL(mockFoo, setDoubleValues(Eq(1), Ge(1)));
mockFoo.setDoubleValues(1, 0);
// EXPECT_CALL(mockFoo, getArbitraryString()).Times(1).WillOnce(Return(value));
// string returnValue = mockFoo.getArbitraryString();
// cout << "Returned Value: " << returnValue << endl;
return EXIT_SUCCESS;
}