16 #include "my_config.h"
17 #include <gtest/gtest.h>
18 #include "delayable_insert_operation.h"
32 TEST(DelayableInsertOperation, SetDupAndIgnore)
34 enum_duplicates duplicate_handling= DUP_REPLACE;
35 bool ignore_errors=
true;
37 Mock_delayable delayed_insert;
39 delayed_insert.set_dup_and_ignore(duplicate_handling, ignore_errors);
40 EXPECT_EQ(duplicate_handling, delayed_insert.get_duplicate_handling());
41 EXPECT_EQ(ignore_errors, delayed_insert.get_ignore_errors());
49 TEST(DelayableInsertOperation, SetFunctionDefaults)
58 Mock_delayable delayed_insert;
61 EXPECT_EQ(initial_value, delayed_insert.get_cached_bitmap());
62 delayed_insert.set_function_defaults(table);
63 EXPECT_EQ(initial_value, delayed_insert.get_cached_bitmap())
64 <<
"Not supposed to allocate anything";