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

Method TestBitwiseAnd

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

Source from the content-addressed store, hash-verified

433}
434
435func (s *ExprSuite) TestBitwiseAnd(c *gc.C) {
436 clause := BitAnd(Literal(1), Literal(2))
437
438 buf := &bytes.Buffer{}
439
440 err := clause.SerializeSql(buf)
441 c.Assert(err, gc.IsNil)
442
443 sql := buf.String()
444 c.Assert(sql, gc.Equals, "1 & 2")
445}
446
447func (s *ExprSuite) TestBitwiseXor(c *gc.C) {
448 clause := BitXor(Literal(1), Literal(2))

Callers

nothing calls this directly

Calls 4

BitAndFunction · 0.85
LiteralFunction · 0.85
SerializeSqlMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected