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

Method TestPlus

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

Source from the content-addressed store, hash-verified

457}
458
459func (s *ExprSuite) TestPlus(c *gc.C) {
460 clause := Plus(Literal(1), Literal(2))
461
462 buf := &bytes.Buffer{}
463
464 err := clause.SerializeSql(buf)
465 c.Assert(err, gc.IsNil)
466
467 sql := buf.String()
468 c.Assert(sql, gc.Equals, "1 + 2")
469}
470
471func (s *ExprSuite) TestMinus(c *gc.C) {
472 clause := Minus(Literal(1), Literal(2))

Callers

nothing calls this directly

Calls 4

PlusFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected