-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Martin Zeithaml <[email protected]>
- Loading branch information
1 parent
f09be06
commit 1fa6dd2
Showing
7 changed files
with
140 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
// This program and the accompanying materials are made available | ||
// under the terms of the Eclipse Public License v2.0 which | ||
// accompanies this distribution, and is available at | ||
// https://www.eclipse.org/legal/epl-v20.html | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 | ||
// | ||
// Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import * as print from './print'; | ||
|
||
export const CLASSIC_FAILS = [ '', null, undefined, true, false, -16, 0, 256, 3.141592, 999999999, | ||
['banana', 'apple', 'kiwi'], | ||
{ success: "guaranteed" } | ||
]; | ||
|
||
export function process(testFunction, testSet, compare, msg) { | ||
let errors = 0; | ||
let result; | ||
if (typeof compare == 'object') { | ||
compare = JSON.stringify(compare); | ||
} | ||
for (let t in testSet) { | ||
if (Array.isArray(testSet[t])) { | ||
result = testFunction(...testSet[t]); | ||
} else { | ||
result = testFunction(testSet[t]); | ||
} | ||
if (typeof result == 'object') { | ||
result = JSON.stringify(result); | ||
} | ||
errors += print.conditionally(result == compare, msg, testSet[t], result); | ||
} | ||
return errors; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
çÁ%%?Ï?Ê%À |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
// This program and the accompanying materials are made available | ||
// under the terms of the Eclipse Public License v2.0 which | ||
// accompanies this distribution, and is available at | ||
// https://www.eclipse.org/legal/epl-v20.html | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 | ||
// | ||
// Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import * as testZos from './testLib/testZos' | ||
|
||
export const TEST_ZOS = [ | ||
testZos.test_changeTag, | ||
testZos.test_changeExtAttr, | ||
testZos.test_changeStreamCCSID, | ||
testZos.test_zstat, | ||
testZos.test_getZosVersion, | ||
testZos.test_getEsm, | ||
testZos.test_dslist, | ||
testZos.test_resolveSymbol, | ||
testZos.test_getStatvfs, | ||
]; | ||
|
||
export const TESTS = [ | ||
...TEST_ZOS | ||
]; |