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

Method TestBitwiseOr

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

Source from the content-addressed store, hash-verified

421}
422
423func (s *ExprSuite) TestBitwiseOr(c *gc.C) {
424 clause := BitOr(Literal(1), Literal(2))
425
426 buf := &bytes.Buffer{}
427
428 err := clause.SerializeSql(buf)
429 c.Assert(err, gc.IsNil)
430
431 sql := buf.String()
432 c.Assert(sql, gc.Equals, "1 | 2")
433}
434
435func (s *ExprSuite) TestBitwiseAnd(c *gc.C) {
436 clause := BitAnd(Literal(1), Literal(2))

Callers

nothing calls this directly

Calls 4

BitOrFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected