@@ -70,6 +70,7 @@ var schema3 = rpc.DatabaseSchema{
70
70
}
71
71
72
72
func TestCreateSQLiteSchema (t * testing.T ) {
73
+ t .Parallel ()
73
74
type args struct {
74
75
schema rpc.DatabaseSchema
75
76
expected string
@@ -103,6 +104,7 @@ func TestCreateSQLiteSchema(t *testing.T) {
103
104
}
104
105
105
106
func TestRawPlugin (t * testing.T ) {
107
+ t .Parallel ()
106
108
// Build the raw plugin
107
109
os .Mkdir ("_test" , 0755 )
108
110
err := exec .Command ("go" , "build" , "-o" , "_test/test.out" , "../test/rawplugin.go" ).Run ()
@@ -188,6 +190,7 @@ func TestRawPlugin(t *testing.T) {
188
190
}
189
191
190
192
func TestRawPlugin2 (t * testing.T ) {
193
+ t .Parallel ()
191
194
// Build the raw plugin
192
195
os .Mkdir ("_test" , 0755 )
193
196
err := exec .Command ("go" , "build" , "-o" , "_test/test2.out" , "../test/rawplugin2.go" ).Run ()
@@ -280,3 +283,21 @@ func TestRawPlugin2(t *testing.T) {
280
283
})
281
284
282
285
}
286
+
287
+ func TestOpCode (t * testing.T ) {
288
+ t .Parallel ()
289
+ // This test ensure that the go-sqlite3 keeps the same opcode
290
+
291
+ assert .Equal (t , int (sqlite3 .OpEQ ), int (rpc .OperatorEqual ), "The opcode EQ must be the same" )
292
+ assert .Equal (t , int (sqlite3 .OpLT ), int (rpc .OperatorLess ), "The opcode LT must be the same" )
293
+ assert .Equal (t , int (sqlite3 .OpLE ), int (rpc .OperatorLessOrEqual ), "The opcode LE must be the same" )
294
+ assert .Equal (t , int (sqlite3 .OpGT ), int (rpc .OperatorGreater ), "The opcode GT must be the same" )
295
+ assert .Equal (t , int (sqlite3 .OpGE ), int (rpc .OperatorGreaterOrEqual ), "The opcode GE must be the same" )
296
+ assert .Equal (t , int (sqlite3 .OpLIKE ), int (rpc .OperatorLike ), "The opcode LIKE must be the same" )
297
+ assert .Equal (t , int (sqlite3 .OpGLOB ), int (rpc .OperatorGlob ), "The opcode GLOB must be the same" )
298
+ assert .Equal (t , int (sqlite3 .OpMATCH ), int (rpc .OperatorMatch ), "The opcode MATCH must be the same" )
299
+ assert .Equal (t , int (sqlite3 .OpREGEXP ), int (rpc .OperatorRegexp ), "The opcode REGEXP must be the same" )
300
+ assert .Equal (t , int (sqlite3 .OpLIMIT ), int (rpc .OperatorLimit ), "The opcode LIMIT must be the same" )
301
+ assert .Equal (t , int (sqlite3 .OpOFFSET ), int (rpc .OperatorOffset ), "The opcode OFFSET must be the same" )
302
+
303
+ }
0 commit comments