|
|
|
|
@ -26,7 +26,6 @@ package rsls
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
"rsls"
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@ -40,11 +39,11 @@ func traditionalBoolError(input int) (bool, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Método con RBool
|
|
|
|
|
func rboolMethod(input int) rsls.RBool {
|
|
|
|
|
func rboolMethod(input int) RBool {
|
|
|
|
|
if input > 0 {
|
|
|
|
|
return rsls.BoolSuccessTrue
|
|
|
|
|
return BoolSuccessTrue
|
|
|
|
|
}
|
|
|
|
|
return rsls.MakeBoolError(errors.New("input must be greater than zero"))
|
|
|
|
|
return MakeBoolError(errors.New("input must be greater than zero"))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BenchmarkTraditional(b *testing.B) {
|
|
|
|
|
|