-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgtest.sql
163 lines (86 loc) · 3.56 KB
/
gtest.sql
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
create temp table temp_blocks (row_number serial, t_content text, t_type flashback.block_type, t_language varchar(10));
create procedure add_block(type flashback.block_type, language varchar(10), content text) language plpgsql as $$ begin insert into temp_blocks (t_type, t_language, t_content) values (type, language, content); end; $$;
call add_block('text', 'txt', '');
call add_block('code', 'cpp', '');
call create_note_with_name('GoogleTest Documentation', 2, '');
call set_section_as_complete('GoogleTest Documentation', 2);
-- simplifying the interface without breaking existing code
-- Alternative to Mocking Concrete Classes
-- Delegating Calls to a Fake
-- Delegating Calls to a Real Object
-- Delegating Calls to a Parent Class
-- Matching Argument Values Exactly
-- Using Simple Matchers
-- Combining Matchers
-- Casting Matchers
-- Selecting Between Overloaded Functions
-- Performing Different Actions Based on the Arguments
-- Matching Multiple Arguments as a Whole
-- Using Matchers as Predicates
-- Using Predicates as Matchers
-- Matching Arguments that Are Not Copyable
-- Validating a Member of an Object
-- Validating the Value Pointed to by a Pointer Argument
-- Defining a Custom Matcher Class
-- Matching Containers
-- Sharing Matchers
-- Knowing When to Expect
-- Ignoring Uninteresting Calls
-- Disallowing Unexpected Calls
-- Understanding Uninteresting vs Unexpected Calls
-- Ignoring Uninteresting Arguments
-- Expecting Ordered Calls
-- Expecting Partially Ordered Calls
-- Controlling When an Expectation Retires
-- Returning References from Mock Methods
-- Returning Live Values from Mock Methods
-- Combining Actions
-- Verifying Complex Arguments
-- Mocking Side Effects
-- Changing a Mock Object’s Behavior Based on the State
-- Setting the Default Value for a Return Type
-- Setting the Default Actions for a Mock Method
-- Using Functions/Methods/Functors/Lambdas as Actions
-- Using Functions with Extra Info as Actions
-- Invoking a Function/Method/Functor/Lambda/Callback Without Arguments
-- Invoking an Argument of the Mock Function
-- Ignoring an Action’s Result
-- Selecting an Action’s Arguments
-- Ignoring Arguments in Action Functions
-- Sharing Actions
-- Testing Asynchronous Behavior
-- Mocking Methods That Use Move-Only Types
-- Making the Compilation Faster
-- Forcing a Verification
-- Using Checkpoints
-- Mocking Destructors
-- Using gMock and Threads
-- Controlling How Much Information gMock Prints
-- Gaining Super Vision into Mock Calls
-- Running Tests in Emacs
-- Writing New Matchers Quickly
-- Adding Custom Failure Messages
-- Using EXPECT_ Statements in Matchers
-- Writing New Parameterized Matchers Quickly
-- Writing New Monomorphic Matchers
-- Writing New Polymorphic Matchers
-- Legacy Matcher Implementation
-- Writing New Cardinalities
-- Writing New Actions
-- Restricting the Type of an Argument or Parameter in an ACTION
-- Writing New Action Templates Quickly
-- Using the ACTION Object’s Type
-- Writing New Monomorphic Actions
-- Writing New Polymorphic Actions
-- Teaching gMock How to Print Your Values
-- Useful Mocks Created Using gMock
call add_block('text', 'txt', '');
call add_block('code', 'cpp', '');
call create_note_with_name('GoogleTest Documentation', 4, '');
call set_section_as_complete('GoogleTest Documentation', 4);
call add_block('text', 'txt', '');
call add_block('code', 'cpp', '');
call create_note_with_name('GoogleTest Documentation', 5, '');
call set_section_as_complete('GoogleTest Documentation', 5);
drop procedure add_block;
drop table temp_blocks;