-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from unbornchikken/io.js-3.0-support
Io.js 3.0 support
- Loading branch information
Showing
3 changed files
with
67 additions
and
47 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,24 @@ | ||
var assert = require('assert') | ||
var ref = require('../') | ||
|
||
// This will check if the new Buffer implementation behaves like the pre io.js 3.0 one did: | ||
describe('iojs3issue', function () { | ||
it('should not crash', function() { | ||
for (var i = 0; i < 10; i++) { | ||
gc() | ||
var buf = new Buffer(8) | ||
buf.fill(0) | ||
var buf2 = ref.ref(buf) | ||
var buf3 = ref.deref(buf2) | ||
} | ||
}) | ||
it('should not crash too', function() { | ||
for (var i = 0; i < 10; i++) { | ||
gc() | ||
var buf = new Buffer(7) | ||
buf.fill(0) | ||
var buf2 = ref.ref(buf) | ||
var buf3 = ref.deref(buf2) | ||
} | ||
}) | ||
}) |