MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Test_Log

Function Test_Log

testing/generation/function_coverage/output/log_test.go:23–1051  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func Test_Log(t *testing.T) {
24 RunScripts(t, []ScriptTest{
25 {
26 Name: "log",
27 Assertions: []ScriptTestAssertion{
28 {
29 Query: "SELECT log( 0::float8 ) ;",
30 ExpectedErr: true,
31 },
32 {
33 Query: "SELECT log( -1::float8 ) ;",
34 ExpectedErr: true,
35 },
36 {
37 Query: "SELECT log( 1::float8 ) ;",
38 Expected: []sql.Row{{float64(0.000000)}},
39 },
40 {
41 Query: "SELECT log( 2::float8 ) ;",
42 Expected: []sql.Row{{float64(0.301030)}},
43 },
44 {
45 Query: "SELECT log( -2::float8 ) ;",
46 ExpectedErr: true,
47 },
48 {
49 Query: "SELECT log( 5.25::float8 ) ;",
50 Expected: []sql.Row{{float64(0.720159)}},
51 },
52 {
53 Query: "SELECT log( 10.87::float8 ) ;",
54 Expected: []sql.Row{{float64(1.036230)}},
55 },
56 {
57 Query: "SELECT log( -10::float8 ) ;",
58 ExpectedErr: true,
59 },
60 {
61 Query: "SELECT log( 100::float8 ) ;",
62 Expected: []sql.Row{{float64(2.000000)}},
63 },
64 {
65 Query: "SELECT log( 21050.48::float8 ) ;",
66 Expected: []sql.Row{{float64(4.323262)}},
67 },
68 {
69 Query: "SELECT log( 100000::float8 ) ;",
70 Expected: []sql.Row{{float64(5.000000)}},
71 },
72 {
73 Query: "SELECT log( -1184280::float8 ) ;",
74 ExpectedErr: true,
75 },
76 {
77 Query: "SELECT log( 2525280.279::float8 ) ;",
78 Expected: []sql.Row{{float64(6.402310)}},
79 },
80 {

Callers

nothing calls this directly

Calls 2

RunScriptsFunction · 0.70
NumericFunction · 0.70

Tested by

no test coverage detected