Created
January 11, 2017 16:23
-
-
Save martinschaef/24c922b0e75a09af3ba3dae5500d118d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Verify; | |
/** | |
* @author schaef | |
* Examples of how to use library stubs | |
* to find more bugs with Python. | |
*/ | |
public class BixieStubTest { | |
public void guavaContracts01(int x) { | |
Verify.verify(x==0); | |
if (x!=0) { | |
System.err.println(x); | |
} | |
} | |
public void guavaContracts02(int x) { | |
Verify.verify(x==0, "Error {} {}", "1", "2"); | |
if (x!=0) { | |
System.err.println(x); | |
} | |
} | |
public void guavaContracts03(Object o) { | |
Verify.verifyNotNull(o, "Error {} {}", "1", "2"); | |
o.toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment