use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.
the class CompilerOptionsTest method test_5.
@Test
public void test_5() {
final CompilerOptions prefs = new CompilerOptions();
prefs.setBooleanOption(CompilerOptions.WARN_UNUSED_FUNCTION, true);
final String actual = prefs.export().toString();
final String expect = "[" + CompilerOptionsTest.DEF_VALUES + "]";
Assert.assertEquals(expect, actual);
}
use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.
the class CompilerOptionsTest method test_4.
@SuppressWarnings("unchecked")
@Test
public void test_4() {
final CompilerOptions prefs = new CompilerOptions();
prefs.setListOption(CompilerOptions.DEFINE, new Pair<>("Macro", "[value,1]"));
final String actual = prefs.export().toString();
final String expect = "[{d,'Macro',[value,1]}," + CompilerOptionsTest.DEF_VALUES + "]";
Assert.assertEquals(expect, actual);
}
use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.
the class CompilerOptionsTest method test_2.
@Test
public void test_2() {
final CompilerOptions prefs = new CompilerOptions();
prefs.setBooleanOption(CompilerOptions.DEBUG_INFO, false);
final String actual = prefs.export().toString();
final String expect = "[" + CompilerOptionsTest.DEF_VALUES + "]";
Assert.assertEquals(expect, actual);
}
use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.
the class CompilerOptionsTest method test_7.
@SuppressWarnings("unchecked")
@Test
public void test_7() {
final CompilerOptions prefs = new CompilerOptions();
prefs.setListOption(CompilerOptions.DEFINE, new Pair<String, String>("Macro", null));
prefs.removeOption(CompilerOptions.DEFINE);
final String actual = prefs.export().toString();
final String expect = "[" + CompilerOptionsTest.DEF_VALUES + "]";
Assert.assertEquals(expect, actual);
}
use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.
the class CompilerOptionsTest method test_6.
@Test
public void test_6() {
final CompilerOptions prefs = new CompilerOptions();
prefs.setBooleanOption(CompilerOptions.WARN_UNUSED_FUNCTION, false);
final String actual = prefs.export().toString();
final String expect = "[nowarn_export_all,nowarn_export_vars,nowarn_shadow_vars,nowarn_unused_function,warn_deprecated_function,nowarn_obsolete_guard,nowarn_unused_import,warn_unused_vars,warn_unused_record]";
Assert.assertEquals(expect, actual);
}
Aggregations