Skip to content

Commit

Permalink
Removed documentation from empty functions
Browse files Browse the repository at this point in the history
The documentation is available in godbc.go
  • Loading branch information
Luis Pabon committed Jun 6, 2014
1 parent f075d13 commit 432535d
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions godbc_prod.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,68 +17,26 @@

package godbc

// InvariantSimpleTester is an interface which provides a receiver to
// test the object
type InvariantSimpleTester interface {
Invariant() bool
}

// InvariantTester is an interface which provides not only an Invariant(),
// but also a receiver to print the structure
type InvariantTester interface {
InvariantSimpleTester
String() string
}

// Require checks that the preconditions are satisfied before
// executing the function
//
// Example Code
//
// func Divide(a, b int) int {
// godbc.Require(b != 0)
// return a/b
// }
//
func Require(b bool, message ...interface{}) {
}

// Ensure checks the postconditions are satisfied before returning
// to the caller.
//
// Example Code
//
// type Data struct {
// a int
// }
//
// func (*d Data) Set(a int) {
// d.a = a
// godbc.Ensure(d.a == a)
// }
//
func Ensure(b bool, message ...interface{}) {
}

// Check provides a simple assert
func Check(b bool, message ...interface{}) {
}

// InvariantSimple calls the objects Invariant() receiver to test
// the object for correctness.
//
// The caller object must provide an object that supports the
// interface InvariantSimpleTester and does not need to provide
// a String() receiver
func InvariantSimple(obj InvariantSimpleTester, message ...interface{}) {
}

// Invariant calls the objects Invariant() receiver to test
// the object for correctness.
//
// The caller object must provide an object that supports the
// interface InvariantTester
//
// To see an example, please take a look at the godbc_test.go
func Invariant(obj InvariantTester, message ...interface{}) {
}

0 comments on commit 432535d

Please sign in to comment.