int compare(int a, int b){return a>b?a:b;}
public class BiggerNum{public static int compare(int a, int b) {return 0;}}- int compare(int a, int b){return a>b?a:b;}
#include <criterion/criterion.h> Test(sample, test) { int a = 10; int b = 5; cr_assert( compare(a, b) == 10); }
import org.junit.Test;import static org.junit.Assert.assertEquals;import org.junit.runners.JUnit4;// TODO: Replace examples and use TDD development by writing your own testspublic class SolutionTest {@Testpublic void testSomething() {int a = 10;int b = 5;//assertEquals(10, BiggerNum.compare(a, b));}}- #include <criterion/criterion.h>
- Test(sample, test) {
- int a = 10;
- int b = 5;
- cr_assert( compare(a, b) == 10);
- }