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

Method TestMulExpr

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

Source from the content-addressed store, hash-verified

148}
149
150func (s *ExprSuite) TestMulExpr(c *gc.C) {
151 expr := Mul(Literal(1), Literal(2), Literal(3))
152
153 buf := &bytes.Buffer{}
154
155 err := expr.SerializeSql(buf)
156 c.Assert(err, gc.IsNil)
157
158 sql := buf.String()
159 c.Assert(sql, gc.Equals, "(1 * 2 * 3)")
160}
161
162func (s *ExprSuite) TestDivExpr(c *gc.C) {
163 expr := Div(Literal(1), Literal(2), Literal(3))

Callers

nothing calls this directly

Calls 4

MulFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected