mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-12 12:13:10 +00:00
ModelImpl test
This commit is contained in:
parent
3b5d4cf924
commit
4b8563773a
23
src/test/java/edu/kit/typicalc/model/ModelImplTest.java
Normal file
23
src/test/java/edu/kit/typicalc/model/ModelImplTest.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package edu.kit.typicalc.model;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
class ModelImplTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getTypeInferer() {
|
||||||
|
ModelImpl model = new ModelImpl();
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
map.put("x", "int");
|
||||||
|
Map<String, String> map2 = new HashMap<>();
|
||||||
|
map2.put("a.x", "3.int");
|
||||||
|
assertTrue(model.getTypeInferer("test.x.x.test", map2).isError());
|
||||||
|
assertTrue(model.getTypeInferer("x", map2).isError());
|
||||||
|
assertTrue(model.getTypeInferer("x", map).isOk());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user