Search in sources :

Example 11 with CompilerOptions

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);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 12 with CompilerOptions

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);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 13 with CompilerOptions

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);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 14 with CompilerOptions

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);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 15 with CompilerOptions

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);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Aggregations

CompilerOptions (org.erlide.core.builder.CompilerOptions)16 Test (org.junit.Test)13 OtpErlangList (com.ericsson.otp.erlang.OtpErlangList)1 IProject (org.eclipse.core.resources.IProject)1 IResource (org.eclipse.core.resources.IResource)1 BuildResource (org.erlide.core.builder.BuildResource)1 IErlModule (org.erlide.engine.model.root.IErlModule)1 IErlProject (org.erlide.engine.model.root.IErlProject)1 IOtpRpc (org.erlide.runtime.rpc.IOtpRpc)1 AbstractErlangEditor (org.erlide.ui.editors.erl.AbstractErlangEditor)1 ErlEditorActionBarContributor (org.erlide.ui.editors.erl.ErlEditorActionBarContributor)1