mirror of
https://github.com/meekrosoft/fff
synced 2026-01-23 08:25:59 +01:00
Fixed tabs for spaces
This commit is contained in:
@@ -85,8 +85,6 @@ TEST_F(FFFTestSuite, when_void_func_with_2_char_args_called_and_reset_then_captu
|
||||
ASSERT_EQ(voidfunc2_arg1_val, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Argument history
|
||||
TEST_F(FFFTestSuite, when_fake_func_created_default_history_is_ten_calls)
|
||||
{
|
||||
@@ -117,9 +115,9 @@ TEST_F(FFFTestSuite, argument_history_is_reset_when_RESET_FAKE_called)
|
||||
TEST_F(FFFTestSuite, when_fake_func_called_max_times_then_no_argument_histories_dropped)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
voidfunc2('1'+i, '2'+i);
|
||||
voidfunc2('1' + i, '2' + i);
|
||||
}
|
||||
ASSERT_EQ(0u, voidfunc2_arg_histories_dropped);
|
||||
}
|
||||
@@ -127,16 +125,14 @@ TEST_F(FFFTestSuite, when_fake_func_called_max_times_then_no_argument_histories_
|
||||
TEST_F(FFFTestSuite, when_fake_func_called_max_times_plus_one_then_one_argument_history_dropped)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
voidfunc2('1'+i, '2'+i);
|
||||
voidfunc2('1' + i, '2' + i);
|
||||
}
|
||||
voidfunc2('1', '2');
|
||||
ASSERT_EQ(1u, voidfunc2_arg_histories_dropped);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Return values
|
||||
TEST_F(FFFTestSuite, value_func_will_return_zero_by_default)
|
||||
{
|
||||
@@ -156,7 +152,6 @@ TEST_F(FFFTestSuite, value_func_will_return_zero_after_reset)
|
||||
ASSERT_EQ(0l, longfunc0());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(FFFTestSuite, register_call_macro_registers_one_call)
|
||||
{
|
||||
REGISTER_CALL(longfunc0);
|
||||
@@ -184,13 +179,13 @@ TEST_F(FFFTestSuite, reset_call_history_resets_call_history)
|
||||
|
||||
TEST_F(FFFTestSuite, call_history_will_not_write_past_array_bounds)
|
||||
{
|
||||
for(unsigned int i = 0; i<MAX_CALL_HISTORY+1; i++){
|
||||
for (unsigned int i = 0; i < MAX_CALL_HISTORY + 1; i++)
|
||||
{
|
||||
REGISTER_CALL(longfunc0);
|
||||
}
|
||||
ASSERT_EQ(MAX_CALL_HISTORY, call_history_idx);
|
||||
}
|
||||
|
||||
|
||||
TEST_F(FFFTestSuite, calling_fake_registers_one_call)
|
||||
{
|
||||
longfunc0();
|
||||
@@ -198,8 +193,6 @@ TEST_F(FFFTestSuite, calling_fake_registers_one_call)
|
||||
ASSERT_EQ(call_history[0], (void *)longfunc0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
setbuf(stdout, NULL);
|
||||
|
||||
@@ -12,7 +12,7 @@ FAKE_VOID_FUNC1(voidfunc1, int);
|
||||
FAKE_VOID_FUNC2(voidfunc2, char, char);
|
||||
FAKE_VALUE_FUNC0(long, longfunc0);
|
||||
|
||||
class FFFTestSuite : public testing::Test
|
||||
class FFFTestSuite: public testing::Test
|
||||
{
|
||||
public:
|
||||
void SetUp()
|
||||
@@ -86,8 +86,6 @@ TEST_F(FFFTestSuite, when_void_func_with_2_char_args_called_and_reset_then_captu
|
||||
ASSERT_EQ(voidfunc2_arg1_val, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Argument history
|
||||
TEST_F(FFFTestSuite, when_fake_func_created_default_history_is_ten_calls)
|
||||
{
|
||||
@@ -118,9 +116,9 @@ TEST_F(FFFTestSuite, argument_history_is_reset_when_RESET_FAKE_called)
|
||||
TEST_F(FFFTestSuite, when_fake_func_called_max_times_then_no_argument_histories_dropped)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
voidfunc2('1'+i, '2'+i);
|
||||
voidfunc2('1' + i, '2' + i);
|
||||
}
|
||||
ASSERT_EQ(0u, voidfunc2_arg_histories_dropped);
|
||||
}
|
||||
@@ -128,16 +126,14 @@ TEST_F(FFFTestSuite, when_fake_func_called_max_times_then_no_argument_histories_
|
||||
TEST_F(FFFTestSuite, when_fake_func_called_max_times_plus_one_then_one_argument_history_dropped)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 10; i++)
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
voidfunc2('1'+i, '2'+i);
|
||||
voidfunc2('1' + i, '2' + i);
|
||||
}
|
||||
voidfunc2('1', '2');
|
||||
ASSERT_EQ(1u, voidfunc2_arg_histories_dropped);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Return values
|
||||
TEST_F(FFFTestSuite, value_func_will_return_zero_by_default)
|
||||
{
|
||||
@@ -157,7 +153,6 @@ TEST_F(FFFTestSuite, value_func_will_return_zero_after_reset)
|
||||
ASSERT_EQ(0l, longfunc0());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(FFFTestSuite, register_call_macro_registers_one_call)
|
||||
{
|
||||
REGISTER_CALL(longfunc0);
|
||||
@@ -185,13 +180,13 @@ TEST_F(FFFTestSuite, reset_call_history_resets_call_history)
|
||||
|
||||
TEST_F(FFFTestSuite, call_history_will_not_write_past_array_bounds)
|
||||
{
|
||||
for(unsigned int i = 0; i<MAX_CALL_HISTORY+1; i++){
|
||||
for (unsigned int i = 0; i < MAX_CALL_HISTORY + 1; i++)
|
||||
{
|
||||
REGISTER_CALL(longfunc0);
|
||||
}
|
||||
ASSERT_EQ(MAX_CALL_HISTORY, call_history_idx);
|
||||
}
|
||||
|
||||
|
||||
TEST_F(FFFTestSuite, calling_fake_registers_one_call)
|
||||
{
|
||||
longfunc0();
|
||||
|
||||
Reference in New Issue
Block a user