From 42ec0648cc88cf715a3691606cee0aaaa638cd8e Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 28 Nov 2024 14:47:16 +0100 Subject: [PATCH] switch from java method addAll() to cfml function array.Append() --- system/BaseSpec.cfc | 4 ++-- system/TestBox.cfc | 8 ++++---- system/compat/framework/TestSuite.cfc | 6 +++--- system/runners/BDDRunner.cfc | 2 +- tests/runners/mxunit/compat-testsuites.cfm | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/system/BaseSpec.cfc b/system/BaseSpec.cfc index 835e3aee..5552e602 100644 --- a/system/BaseSpec.cfc +++ b/system/BaseSpec.cfc @@ -988,11 +988,11 @@ component { var consolidatedLabels = arguments.spec.labels; var md = getMetadata( this ); param md.labels = ""; - consolidatedLabels.addAll( listToArray( md.labels ) ); + consolidatedLabels.append( listToArray( md.labels, true ) ); // Build labels from nested suites, so suites inherit from parent suite labels var parentSuite = arguments.suite; while ( !isSimpleValue( parentSuite ) ) { - consolidatedLabels.addAll( parentSuite.labels ); + consolidatedLabels.append( parentSuite.labels, true ); parentSuite = parentSuite.parentref; } diff --git a/system/TestBox.cfc b/system/TestBox.cfc index 7fb97bdf..9894d0f0 100644 --- a/system/TestBox.cfc +++ b/system/TestBox.cfc @@ -406,16 +406,16 @@ component accessors="true" { // Verify URL conventions for bundle, suites and specs exclusions. if ( !isNull( url.testBundles ) ) { - testBundles.addAll( listToArray( urlDecode( url.testBundles ) ) ); + testBundles.append( listToArray( urlDecode( url.testBundles ) ), true ); } if ( !isNull( url.testSuites ) ) { - arguments.testSuites.addAll( listToArray( urlDecode( url.testSuites ) ) ); + arguments.testSuites.append( listToArray( urlDecode( url.testSuites ) ), true ); } if ( !isNull( url.testSpecs ) ) { - arguments.testSpecs.addAll( listToArray( urlDecode( url.testSpecs ) ) ); + arguments.testSpecs.append( listToArray( urlDecode( url.testSpecs ) ), true ); } if ( !isNull( url.testMethod ) ) { - arguments.testSpecs.addAll( listToArray( urlDecode( url.testMethod ) ) ); + arguments.testSpecs.append( listToArray( urlDecode( url.testMethod ) ), true ); } // Using a directory runner? diff --git a/system/compat/framework/TestSuite.cfc b/system/compat/framework/TestSuite.cfc index a29f0bef..f15112c2 100644 --- a/system/compat/framework/TestSuite.cfc +++ b/system/compat/framework/TestSuite.cfc @@ -19,13 +19,13 @@ component accessors="true" { remote function addTest( required componentName, required method ){ arrayAppend( variables.bundles, arguments.componentName ); - variables.testSpecs.addAll( listToArray( arguments.method ) ); + variables.testSpecs.append( listToArray( arguments.method ), true ); return this; } remote function add( required componentName, required methods ){ arrayAppend( variables.bundles, arguments.componentName ); - variables.testSpecs.addAll( listToArray( arguments.methods ) ); + variables.testSpecs.append( listToArray( arguments.methods ), true ); return this; } @@ -36,7 +36,7 @@ component accessors="true" { remote function run( testMethod = "" ){ if ( len( arguments.testMethod ) ) { - variables.testSpecs.addAll( listToArray( arguments.testMethod ) ); + variables.testSpecs.append( listToArray( arguments.testMethod ), true ); } return new Results( variables.bundles, variables.testSpecs ); } diff --git a/system/runners/BDDRunner.cfc b/system/runners/BDDRunner.cfc index a93d1bd4..5cba6d93 100644 --- a/system/runners/BDDRunner.cfc +++ b/system/runners/BDDRunner.cfc @@ -197,7 +197,7 @@ component // Build labels from nested suites, so suites inherit from parent suite labels var parentSuite = arguments.suite; while ( !isSimpleValue( parentSuite ) ) { - consolidatedLabels.addAll( parentSuite.labels ); + consolidatedLabels.append( parentSuite.labels, true ); parentSuite = parentSuite.parentref; } diff --git a/tests/runners/mxunit/compat-testsuites.cfm b/tests/runners/mxunit/compat-testsuites.cfm index 104045c2..af6a9b86 100644 --- a/tests/runners/mxunit/compat-testsuites.cfm +++ b/tests/runners/mxunit/compat-testsuites.cfm @@ -1,6 +1,6 @@ - + #r.getResultsOutput( reporter="simple" )#