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

TESTBOX-407 switch from java method addAll() to cfml array.Append() #157

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions system/BaseSpec.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions system/TestBox.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
6 changes: 3 additions & 3 deletions system/compat/framework/TestSuite.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion system/runners/BDDRunner.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/runners/mxunit/compat-testsuites.cfm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<cfsetting showdebugoutput="false" >
<cfset suite = new testbox.system.compat.framework.TestSuite().TestSuite()>
<cfset suite.addAll( "testbox.tests.specs.MXUnitCompatTest" )>
<cfset suite.append( "testbox.tests.specs.MXUnitCompatTest" )>
<cfset r = suite.run()>
<cfoutput>#r.getResultsOutput( reporter="simple" )#</cfoutput>

Expand Down
Loading