use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ArgsDefCond method testVarAndArgs_OK3.
@Test
@Ignore("Checking downstream structkeyexists is not implemented")
public void testVarAndArgs_OK3() throws CFLintScanException {
final String cfcSrc = "<cfcomponent>\r\n" + "<cffunction name=\"test\">\r\n" + " <cfargument name=\"xyz\">\r\n" + "<cfset var test = structkeyexists(arguments, \"xyz\")/></cffunction>\r\n" + "</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ArgsDefCond method testVarAndArgs_Cfscript_OK.
@Test
public void testVarAndArgs_Cfscript_OK() throws CFLintScanException {
final String cfcSrc = "component { \r\n" + "public void function foo(required any arg1) { \r\n" + "} \r\n" + "}";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ArgsDefCond method testVarAndArgs_Cfscript_OK2.
@Test
public void testVarAndArgs_Cfscript_OK2() throws CFLintScanException {
final String cfcSrc = "component { \r\n" + "public void function foo(any arg1=\"123\") { \r\n" + "} \r\n" + "}";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ArgsDefCond method testVarAndArgs_OK1.
@Test
public void testVarAndArgs_OK1() throws CFLintScanException {
final String cfcSrc = "<cfcomponent>\r\n" + "<cffunction name=\"test\">\r\n" + " <cfargument name=\"xyz\" default=\"123\">\r\n" + "</cffunction>\r\n" + "</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
use of com.cflint.api.CFLintResult in project CFLint by cflint.
the class TestCFBugs_ArgsDefCond method testVarAndArgs_OK2.
@Test
public void testVarAndArgs_OK2() throws CFLintScanException {
final String cfcSrc = "<cfcomponent>\r\n" + "<cffunction name=\"test\">\r\n" + " <cfargument name=\"xyz\" required=\"true\">\r\n" + "</cffunction>\r\n" + "</cfcomponent>";
CFLintResult lintresult = cfBugs.scan(cfcSrc, "test");
final Map<String, List<BugInfo>> result = lintresult.getIssues();
assertEquals(0, result.size());
}
Aggregations