MCPcopy
hub / github.com/dropbox/godropbox / TestDivExpr

Method TestDivExpr

database/sqlbuilder/expression_test.go:162–172  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

160}
161
162func (s *ExprSuite) TestDivExpr(c *gc.C) {
163 expr := Div(Literal(1), Literal(2), Literal(3))
164
165 buf := &bytes.Buffer{}
166
167 err := expr.SerializeSql(buf)
168 c.Assert(err, gc.IsNil)
169
170 sql := buf.String()
171 c.Assert(sql, gc.Equals, "(1 / 2 / 3)")
172}
173
174func (s *ExprSuite) TestBinaryExprNilLHS(c *gc.C) {
175 expr := Gt(nil, table1Col1)

Callers

nothing calls this directly

Calls 4

DivFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected