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

Method TestMinus

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

Source from the content-addressed store, hash-verified

469}
470
471func (s *ExprSuite) TestMinus(c *gc.C) {
472 clause := Minus(Literal(1), Literal(2))
473
474 buf := &bytes.Buffer{}
475
476 err := clause.SerializeSql(buf)
477 c.Assert(err, gc.IsNil)
478
479 sql := buf.String()
480 c.Assert(sql, gc.Equals, "1 - 2")
481}
482
483func (s *ExprSuite) TestInterval(c *gc.C) {
484 testTable := []struct {

Callers

nothing calls this directly

Calls 4

MinusFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected