use of at.ac.tuwien.kr.alpha.api.config.AlphaConfig in project Alpha by alpha-asp.
the class CommandLineParserTest method grounderToleranceConstraints_string.
@Test
public void grounderToleranceConstraints_string() throws ParseException {
CommandLineParser parser = new CommandLineParser(DEFAULT_COMMAND_LINE, DEFAULT_ABORT_ACTION);
AlphaConfig alphaConfig = parser.parseCommandLine(new String[] { "-str", "aString.", "-gtc", "strict" });
assertEquals("strict", alphaConfig.getSystemConfig().getGrounderToleranceConstraints());
}
use of at.ac.tuwien.kr.alpha.api.config.AlphaConfig in project Alpha by alpha-asp.
the class CommandLineParserTest method disableStratifiedEvalLongOpt.
@Test
public void disableStratifiedEvalLongOpt() throws ParseException {
CommandLineParser parser = new CommandLineParser(DEFAULT_COMMAND_LINE, DEFAULT_ABORT_ACTION);
AlphaConfig ctx = parser.parseCommandLine(new String[] { "-i", "someFile.asp", "-i", "someOtherFile.asp", "--disableStratifiedEvaluation" });
assertFalse(ctx.getSystemConfig().isEvaluateStratifiedPart());
}
use of at.ac.tuwien.kr.alpha.api.config.AlphaConfig in project Alpha by alpha-asp.
the class CommandLineParserTest method grounderToleranceRules_string.
@Test
public void grounderToleranceRules_string() throws ParseException {
CommandLineParser parser = new CommandLineParser(DEFAULT_COMMAND_LINE, DEFAULT_ABORT_ACTION);
AlphaConfig alphaConfig = parser.parseCommandLine(new String[] { "-str", "aString.", "-gtr", "permissive" });
assertEquals("permissive", alphaConfig.getSystemConfig().getGrounderToleranceRules());
}
use of at.ac.tuwien.kr.alpha.api.config.AlphaConfig in project Alpha by alpha-asp.
the class CommandLineParserTest method numAnswerSets.
@Test
public void numAnswerSets() throws ParseException {
CommandLineParser parser = new CommandLineParser(DEFAULT_COMMAND_LINE, DEFAULT_ABORT_ACTION);
AlphaConfig ctx = parser.parseCommandLine(new String[] { "-str", "aString.", "-n", "00435" });
assertEquals(435, ctx.getInputConfig().getNumAnswerSets());
}
use of at.ac.tuwien.kr.alpha.api.config.AlphaConfig in project Alpha by alpha-asp.
the class CommandLineParserTest method basicUsageWithString.
@Test
public void basicUsageWithString() throws ParseException {
CommandLineParser parser = new CommandLineParser(DEFAULT_COMMAND_LINE, DEFAULT_ABORT_ACTION);
AlphaConfig ctx = parser.parseCommandLine(new String[] { "-str", "b :- a.", "-str", "c :- a, b." });
assertEquals(Arrays.asList(new String[] { "b :- a.", "c :- a, b." }), ctx.getInputConfig().getAspStrings());
}
Aggregations