forked from runtimeverification/k
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKastModuleTest.java
More file actions
26 lines (21 loc) · 870 Bytes
/
KastModuleTest.java
File metadata and controls
26 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2014-2019 K Team. All Rights Reserved.
package org.kframework.kast;
import static org.junit.Assert.*;
import org.junit.Test;
import org.kframework.main.FrontEnd;
import org.kframework.utils.BaseTestCase;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.util.Modules;
import java.util.List;
public class KastModuleTest extends BaseTestCase {
@Test
public void testCreateInjection() {
String[] argv = new String[] { "foo.c" };
List<Module> modules = KastFrontEnd.getModules();
Injector injector = Guice.createInjector(Modules.override(modules).with(new TestModule(), new DefinitionSpecificTestModule()));
prepInjector(injector, "-kast", argv);
assertTrue(injector.getInstance(FrontEnd.class) instanceof KastFrontEnd);
}
}