Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EL TCK : Removed usage of lib.util and common modules, updated sigtest plugin #1226

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions el/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.netbeans.tools</groupId>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.7</version>
<version>2.1</version>
</dependency>

</dependencies>
Expand Down Expand Up @@ -167,9 +167,9 @@
<build>
<plugins>
<plugin>
<groupId>org.netbeans.tools</groupId>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.4</version>
<version>2.1</version>
<configuration>
<FileName>${project.build.directory}/jakarta.el.sig_${project.parent.version}</FileName>
<packages>jakarta.el</packages>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

package com.sun.ts.tests.el.api.jakarta_el.arrayelresolver;

import com.sun.ts.lib.util.TestUtil;
import com.sun.ts.tests.common.el.api.resolver.ResolverTest;

import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BareBonesELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;

Expand Down Expand Up @@ -260,7 +260,7 @@ public void arrayELResolverOBETest() throws Exception {

if (value != null) {
pass = false;
buf.append("Expected Value: 'null'").append(TestUtil.NEW_LINE)
buf.append("Expected Value: 'null'").append(ELTestUtil.NL)
.append("Received Value: ").append(value.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package com.sun.ts.tests.el.api.jakarta_el.beanelresolver;

import com.sun.ts.lib.util.TestUtil;
import com.sun.ts.tests.common.el.api.resolver.ResolverTest;

import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BareBonesELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.SimpleBean;
Expand Down Expand Up @@ -118,8 +118,8 @@ public void beanELResolverDefaultMethodReadOnlyTest() throws Exception {
} catch (Exception ex) {
pass = false;
logger.log(Logger.Level.ERROR, "Test of a valid expression using a Bean with a read-only " +
"property implemented via default methods threw an Exception!" + TestUtil.NEW_LINE +
"Received: " + ex.toString() + TestUtil.NEW_LINE);
"property implemented via default methods threw an Exception!" + ELTestUtil.NL +
"Received: " + ex.toString() + ELTestUtil.NL);

ex.printStackTrace();
}
Expand Down Expand Up @@ -156,8 +156,8 @@ public void beanELResolverDefaultMethodReadWriteTest() throws Exception {
} catch (Exception ex) {
pass = false;
logger.log(Logger.Level.ERROR, "Test of a valid expression using a Bean with a read-write " +
"property implemented via default methods threw an Exception!" + TestUtil.NEW_LINE +
"Received: " + ex.toString() + TestUtil.NEW_LINE);
"property implemented via default methods threw an Exception!" + ELTestUtil.NL +
"Received: " + ex.toString() + ELTestUtil.NL);

ex.printStackTrace();
}
Expand Down Expand Up @@ -231,8 +231,8 @@ public void beanELResolverInvokeVoidTest() throws Exception {
context, beanResolver, sb, "isName", types, values, Boolean.FALSE, buf);
} else {
pass = false;
buf.append("Unexpected Value returned!" + TestUtil.NEW_LINE
+ "Expected: null" + TestUtil.NEW_LINE + "Recieved: "
buf.append("Unexpected Value returned!" + ELTestUtil.NL
+ "Expected: null" + ELTestUtil.NL + "Recieved: "
+ result.getClass().getName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.SimpleBean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.Properties;


import com.sun.ts.lib.util.TestUtil;
import com.sun.ts.tests.common.el.api.resolver.ResolverTest;

import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BareBonesELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.SimpleBean;
Expand Down Expand Up @@ -166,7 +166,7 @@ public void compositeELResolverAddNPETest() throws Exception {

compResolver.add(null);

buf.append(TestUtil.NEW_LINE + "Tested Failed, CompositeResolver.add(), "
buf.append(ELTestUtil.NL + "Tested Failed, CompositeResolver.add(), "
+ "should have thrown NullPointerException!");
pass = false;

Expand All @@ -175,9 +175,9 @@ public void compositeELResolverAddNPETest() throws Exception {
+ " null resolver to Composite.add()");

} catch (Exception e) {
buf.append("test failed with: " + TestUtil.NEW_LINE + "EXPECTED: "
+ "NullPointerException to be thrown " + TestUtil.NEW_LINE
+ "RECEIVED: " + e.toString() + "" + TestUtil.NEW_LINE);
buf.append("test failed with: " + ELTestUtil.NL + "EXPECTED: "
+ "NullPointerException to be thrown " + ELTestUtil.NL
+ "RECEIVED: " + e.toString() + "" + ELTestUtil.NL);
pass = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.Properties;


import com.sun.ts.lib.util.TestUtil;

import com.sun.ts.tests.el.common.util.ELTestUtil;

import jakarta.el.ELContext;
Expand Down Expand Up @@ -79,7 +79,7 @@ public void elContextPutGetContextTest() throws Exception {

if (!testStr.equals(result)) {
throw new Exception(ELTestUtil.FAIL + " Unexpected Context Returned!"
+ TestUtil.NEW_LINE + "Expected: " + testStr + TestUtil.NEW_LINE
+ ELTestUtil.NL + "Expected: " + testStr + ELTestUtil.NL
+ "Received: " + result);
}

Expand All @@ -105,7 +105,7 @@ public void elContextGetSetLocaleTest() throws Exception {

if (!result.equalsIgnoreCase(disName)) {
throw new Exception(ELTestUtil.FAIL + " Unexpected Locale Returned!"
+ TestUtil.NEW_LINE + "Expected: " + disName + TestUtil.NEW_LINE
+ ELTestUtil.NL + "Expected: " + disName + ELTestUtil.NL
+ "Received: " + result);
}

Expand All @@ -130,7 +130,7 @@ public void elContextIsSetPropertyResolvedTest() throws Exception {
if (isProp) {
throw new Exception(
ELTestUtil.FAIL + " Unexpected result from isPropertyResolved()!"
+ TestUtil.NEW_LINE + "Should have been false!");
+ ELTestUtil.NL + "Should have been false!");
}

elc.setPropertyResolved(true);
Expand All @@ -139,7 +139,7 @@ public void elContextIsSetPropertyResolvedTest() throws Exception {
if (!isProp) {
throw new Exception(
ELTestUtil.FAIL + " Unexpected result from isPropertyResolved()!"
+ TestUtil.NEW_LINE + "Should have been true!");
+ ELTestUtil.NL + "Should have been true!");
}

} // end elContextIsSetPropertyResolvedTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BarELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.SimpleBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.Properties;


import com.sun.ts.lib.util.TestUtil;
import com.sun.ts.tests.common.el.api.expression.ExpressionTest;

import com.sun.ts.tests.el.common.api.expression.ExpressionTest;
import com.sun.ts.tests.el.common.elcontext.SimpleELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.ResolverType;
Expand Down Expand Up @@ -91,15 +91,15 @@ public void negativeEqualsTest() throws Exception {

if (ExpressionTest.equalsTest(vexp1, null, buf)) {
pass = false;
buf.append("ValueExpression tested equal to null" + TestUtil.NEW_LINE);
buf.append("ValueExpression tested equal to null" + ELTestUtil.NL);
}

MethodExpression mexp1 = expFactory.createMethodExpression(context,
"null", null, new Class[] {});

if (ExpressionTest.equalsTest(mexp1, null, buf)) {
pass = false;
buf.append("MethodExpression tested equal to null" + TestUtil.NEW_LINE);
buf.append("MethodExpression tested equal to null" + ELTestUtil.NL);
}

// compare ValueExpressions to MethodExpressions
Expand All @@ -112,13 +112,13 @@ public void negativeEqualsTest() throws Exception {
if (ExpressionTest.equalsTest(vexp2, mexp2, buf)) {
pass = false;
buf.append("ValueExpression tested equal to " + "MethodExpression"
+ TestUtil.NEW_LINE);
+ ELTestUtil.NL);
}

if (ExpressionTest.equalsTest(mexp2, vexp2, buf)) {
pass = false;
buf.append("MethodExpression tested equal to " + "ValueExpression"
+ TestUtil.NEW_LINE);
+ ELTestUtil.NL);
}

} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Properties;


import com.sun.ts.lib.util.TestUtil;

import com.sun.ts.tests.el.common.elcontext.SimpleELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.ExprEval;
Expand Down Expand Up @@ -131,12 +131,12 @@ public void createValueExpressionTest() throws Exception {
} catch (NullPointerException npe) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(npe);
ELTestUtil.printStackTrace(npe);
continue;
} catch (ELException ee) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(ee);
ELTestUtil.printStackTrace(ee);
continue;
}

Expand Down Expand Up @@ -187,7 +187,7 @@ public void createValueExpression2Test() throws Exception {
} catch (Exception e) {
pass = false;
logger.log(Logger.Level.ERROR, "Exception: Test Case " + i);
TestUtil.printStackTrace(e);
ELTestUtil.printStackTrace(e);
}
}

Expand Down Expand Up @@ -245,7 +245,7 @@ public void createValueExpressionELExceptionTest() throws Exception {
} catch (NullPointerException npe) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(npe);
ELTestUtil.printStackTrace(npe);
continue;
}
pass = false;
Expand Down Expand Up @@ -300,12 +300,12 @@ public void createMethodExpressionTest() throws Exception {
} catch (NullPointerException npe) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(npe);
ELTestUtil.printStackTrace(npe);
continue;
} catch (ELException ee) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(ee);
ELTestUtil.printStackTrace(ee);
continue;
}

Expand Down Expand Up @@ -377,13 +377,12 @@ public void createMethodExpressionELExceptionTest() throws Exception {
} catch (NullPointerException npe) {
pass = false;
logger.log(Logger.Level.ERROR, ELTestUtil.FAIL + exprStr[i]);
TestUtil.printStackTrace(npe);
ELTestUtil.printStackTrace(npe);
continue;
}
pass = false;
logger.log(Logger.Level.ERROR, "Failed. No ELException thrown when calling");
TestUtil
.logErr("createMethodExpression() with parameter " + exprStr[i]);
logger.log(Logger.Level.ERROR, "createMethodExpression() with parameter " + exprStr[i]);
}

} catch (Exception ex) {
Expand Down Expand Up @@ -474,7 +473,7 @@ public void coerceToTypeTest() throws Exception {
} catch (Exception e) {
pass = false;
logger.log(Logger.Level.ERROR, "Exception: Test Case " + i);
TestUtil.printStackTrace(e);
ELTestUtil.printStackTrace(e);
}
}

Expand Down Expand Up @@ -517,7 +516,7 @@ public void coerceToTypeELExceptionTest() throws Exception {
pass = false;
logger.log(Logger.Level.ERROR, "Test Case " + i + " threw an exception");
logger.log(Logger.Level.ERROR, "but it was not an ELException");
TestUtil.printStackTrace(e);
ELTestUtil.printStackTrace(e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Properties;


import com.sun.ts.lib.util.TestUtil;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.elcontext.FuncMapperELContext;

import jakarta.el.FunctionMapper;
Expand Down Expand Up @@ -78,26 +78,26 @@ public void functionMapperTest() throws Exception {

if (funcMapper.resolveFunction("foo", "bar") != null) {
logger.log(Logger.Level.ERROR, "Expected call to resolveFunction() to unassigned "
+ "function to return null" + TestUtil.NEW_LINE
+ "function to return null" + ELTestUtil.NL
+ "Instead call returned: "
+ funcMapper.resolveFunction("foo", "bar").getName()
+ TestUtil.NEW_LINE);
+ ELTestUtil.NL);

throw new Exception("Resolved unassigned function");
}

Method method = funcMapper.resolveFunction("Int", "val");
if (method == null) {
logger.log(Logger.Level.ERROR, "Expected call to resolveFunction() to resolvable "
+ "function to return a non-null value" + TestUtil.NEW_LINE);
+ "function to return a non-null value" + ELTestUtil.NL);

throw new Exception("Incorrect resolution: null method");
} else {
String methodSignature = method.toString();
if (!methodSignature.equals(expected)) {
logger.log(Logger.Level.ERROR, "Method Signature of resolved function is " + "invalid"
+ TestUtil.NEW_LINE + "Expected value:" + expected
+ TestUtil.NEW_LINE);
+ ELTestUtil.NL + "Expected value:" + expected
+ ELTestUtil.NL);

throw new Exception("Incorrect resolution: wrong method Signature");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BareBonesELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.api.resolver.ResolverTest;
import com.sun.ts.tests.el.common.elcontext.BareBonesELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.expression.ExpressionTest;
import com.sun.ts.tests.el.common.api.expression.ExpressionTest;
import com.sun.ts.tests.el.common.elcontext.SimpleELContext;
import com.sun.ts.tests.el.common.elcontext.VarMapperELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Properties;


import com.sun.ts.tests.common.el.api.expression.ExpressionTest;
import com.sun.ts.tests.el.common.api.expression.ExpressionTest;
import com.sun.ts.tests.el.common.elcontext.SimpleELContext;
import com.sun.ts.tests.el.common.util.ELTestUtil;
import com.sun.ts.tests.el.common.util.ResolverType;
Expand Down
Loading
Loading