Skip to content

Commit f5a05a3

Browse files
Added test case for method overload error, for more robust testing.
1 parent 0ad50cc commit f5a05a3

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package testSuite.classes.method_overload_error;
2+
3+
import liquidjava.specification.ExternalRefinementsFor;
4+
import liquidjava.specification.Refinement;
5+
6+
@ExternalRefinementsFor("java.util.concurrent.Semaphore")
7+
public interface DummySemaphoreRefinements {
8+
9+
public abstract void acquire();
10+
11+
public abstract void acquire(@Refinement("_ >= 0") int permits) throws InterruptedException;
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package testSuite.classes.method_overload_error;
2+
3+
import java.util.concurrent.Semaphore;
4+
5+
public class TestMethodOverloadError {
6+
public static void main(String[] args) throws InterruptedException {
7+
Semaphore sem = new Semaphore(1);
8+
sem.acquire(-1);
9+
}
10+
}

0 commit comments

Comments
 (0)