MCPcopy
hub / github.com/gogf/gf / Test_Tables

Function Test_Tables

contrib/drivers/oracle/oracle_z_unit_basic_test.go:21–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19)
20
21func Test_Tables(t *testing.T) {
22 gtest.C(t, func(t *gtest.T) {
23 tables := []string{"t_user1", "pop", "haha"}
24
25 for _, v := range tables {
26 createTable(v)
27 }
28
29 result, err := db.Tables(ctx)
30 gtest.AssertNil(err)
31
32 for i := 0; i < len(tables); i++ {
33 find := false
34 for j := 0; j < len(result); j++ {
35 if strings.ToUpper(tables[i]) == result[j] {
36 find = true
37 break
38 }
39 }
40 gtest.AssertEQ(find, true)
41 }
42
43 result, err = db.Tables(ctx, TestSchema)
44 gtest.AssertNil(err)
45 for i := 0; i < len(tables); i++ {
46 find := false
47 for j := 0; j < len(result); j++ {
48 if strings.ToUpper(tables[i]) == result[j] {
49 find = true
50 break
51 }
52 }
53 gtest.AssertEQ(find, true)
54 }
55
56 for _, v := range tables {
57 dropTable(v)
58 }
59 })
60}
61
62func Test_Table_Fields(t *testing.T) {
63 gtest.C(t, func(t *gtest.T) {

Callers

nothing calls this directly

Calls 6

CFunction · 0.92
AssertNilFunction · 0.92
AssertEQFunction · 0.92
createTableFunction · 0.70
dropTableFunction · 0.70
TablesMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…