use of org.ballerinalang.launcher.util.CompileResult in project ballerina by ballerina-lang.
the class TaintedStatusPropagationTest method testServiceVariables.
@Test
public void testServiceVariables() {
CompileResult result = BCompileUtil.compile("test-src/taintchecking/propagation/service-level-variables.bal");
Assert.assertTrue(result.getDiagnostics().length == 0);
}
use of org.ballerinalang.launcher.util.CompileResult in project ballerina by ballerina-lang.
the class TaintedStatusPropagationTest method testTupleReturnNegative.
@Test
public void testTupleReturnNegative() {
CompileResult result = BCompileUtil.compile("test-src/taintchecking/propagation/tuple-return-negative.bal");
Assert.assertTrue(result.getDiagnostics().length == 2);
BAssertUtil.validateError(result, 0, "tainted value passed to sensitive parameter 'secureIn'", 6, 20);
BAssertUtil.validateError(result, 1, "tainted value passed to sensitive parameter 'secureIn'", 7, 20);
}
use of org.ballerinalang.launcher.util.CompileResult in project ballerina by ballerina-lang.
the class TaintedStatusPropagationTest method testIterable.
@Test
public void testIterable() {
CompileResult result = BCompileUtil.compile("test-src/taintchecking/propagation/iterable.bal");
Assert.assertTrue(result.getDiagnostics().length == 0);
}
use of org.ballerinalang.launcher.util.CompileResult in project ballerina by ballerina-lang.
the class TaintedStatusPropagationTest method testReturnNegative.
@Test
public void testReturnNegative() {
CompileResult result = BCompileUtil.compile("test-src/taintchecking/propagation/returns-negative.bal");
Assert.assertTrue(result.getDiagnostics().length == 1);
BAssertUtil.validateError(result, 0, "tainted value passed to sensitive parameter 'secureIn'", 2, 20);
}
use of org.ballerinalang.launcher.util.CompileResult in project ballerina by ballerina-lang.
the class GlobalVarErrorTest method testStructFieldWithChildPackagePaths.
@Test
public void testStructFieldWithChildPackagePaths() {
CompileResult resultNegative = BCompileUtil.compile("test-src/statements/variabledef/global-var-function-negative.bal");
BAssertUtil.validateError(resultNegative, 0, "extraneous input ':'", 7, 20);
}
Aggregations