MCPcopy Index your code
hub / github.com/apache/tomcat / testSetValue08

Method testSetValue08

test/jakarta/el/TestArrayELResolver.java:314–323  ·  view source on GitHub ↗

Tests setting arrays of primitives. https://bz.apache.org/bugzilla/show_bug.cgi?id=55691

()

Source from the content-addressed store, hash-verified

312 * Tests setting arrays of primitives. https://bz.apache.org/bugzilla/show_bug.cgi?id=55691
313 */
314 @Test
315 public void testSetValue08() {
316 ArrayELResolver resolver = new ArrayELResolver();
317 ELContext context = new StandardELContext(ELManager.getExpressionFactory());
318
319 int[] base = new int[] { 1, 2, 3 };
320 resolver.setValue(context, base, Integer.valueOf(1), Integer.valueOf(4));
321
322 Assert.assertEquals(Integer.valueOf(base[1]), Integer.valueOf(4));
323 }
324
325 /*
326 * Null base should be a NO-OP rather than an exception

Callers

nothing calls this directly

Calls 3

getExpressionFactoryMethod · 0.95
setValueMethod · 0.95
valueOfMethod · 0.45

Tested by

no test coverage detected