GeezerVison is showing github.com — test: abstract skip functionality to common · nodejs/node@4067cde
File treeExpand file treeCollapse file tree Open diff view settings addons/stringbytes-external-exceed-max
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-at-max.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,10 +8,9 @@ const assert = require('assert'); | 8 | 8 | // v8::String::kMaxLength defined in v8.h | 9 | 9 | const kStringMaxLength = process.binding('buffer').kStringMaxLength; | 10 | 10 |
| 11 | | -const skipMessage = | 12 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 11 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 13 | 12 | if (!common.enoughTestMem) { | 14 | | - console.log(skipMessage); | | 13 | + common.skip(skipMessage); | 15 | 14 | return; | 16 | 15 | } | 17 | 16 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-ascii.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-base64.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-binary.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-hex.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-1-utf8.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max.js +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,9 @@ const common = require('../../common'); | 4 | 4 | const binding = require('./build/Release/binding'); | 5 | 5 | const assert = require('assert'); | 6 | 6 |
| 7 | | -const skipMessage = | 8 | | - '1..0 # Skipped: intensive toString tests due to memory confinements'; | | 7 | +const skipMessage = 'intensive toString tests due to memory confinements'; | 9 | 8 | if (!common.enoughTestMem) { | 10 | | - console.log(skipMessage); | | 9 | + common.skip(skipMessage); | 11 | 10 | return; | 12 | 11 | } | 13 | 12 |
| @@ -20,13 +19,13 @@ try { | 20 | 19 | } catch (e) { | 21 | 20 | // If the exception is not due to memory confinement then rethrow it. | 22 | 21 | if (e.message !== 'Invalid array buffer length') throw (e); | 23 | | - console.log(skipMessage); | | 22 | + common.skip(skipMessage); | 24 | 23 | return; | 25 | 24 | } | 26 | 25 |
| 27 | 26 | // Ensure we have enough memory available for future allocations to succeed. | 28 | 27 | if (!binding.ensureAllocation(2 * kStringMaxLength)) { | 29 | | - console.log(skipMessage); | | 28 | + common.skip(skipMessage); | 30 | 29 | return; | 31 | 30 | } | 32 | 31 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/common.js +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -459,6 +459,10 @@ exports.fail = function(msg) { | 459 | 459 | assert.fail(null, null, msg); | 460 | 460 | }; | 461 | 461 |
| | 462 | +exports.skip = function(msg) { | | 463 | + console.log(`1..0 # Skipped: ${msg}`); | | 464 | +}; | | 465 | + | 462 | 466 | // Returns true if the exit code "exitCode" and/or signal name "signal" | 463 | 467 | // represent the exit code and/or signal name of a node process that aborted, | 464 | 468 | // false otherwise. | |
Collapse file Copy file name to clipboardExpand all lines: test/disabled/tls_server.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ var certPem = fs.readFileSync(common.fixturesDir + '/cert.pem'); | 13 | 13 | try { | 14 | 14 | var credentials = crypto.createCredentials({key: keyPem, cert: certPem}); | 15 | 15 | } catch (e) { | 16 | | - console.log('1..0 # Skipped: node compiled without OpenSSL.'); | | 16 | + common.skip('node compiled without OpenSSL.'); | 17 | 17 | return; | 18 | 18 | } | 19 | 19 | var i = 0; | |
|