Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Add timers tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iefserge committed Jun 20, 2015
1 parent 8389815 commit 5c967a7
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/test/buffers/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';
require('./physical-address');
14 changes: 14 additions & 0 deletions js/test/buffers/physical-address.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';
var test = require('tape');
var resources = require('../../core/resources');
Expand Down
15 changes: 15 additions & 0 deletions js/test/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';
var runtime = require('../');
var test = require('tape');
Expand All @@ -14,5 +28,6 @@ stream.on('data', function (v) {
stream.on('end', shutdown);

require('./buffers');
require('./timers');
require('./virtio');
require('./net');
14 changes: 14 additions & 0 deletions js/test/net/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

require('./tcp');
require('./tcp-receive');
14 changes: 14 additions & 0 deletions js/test/net/tcp-receive.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

var test = require('tape');
Expand Down
14 changes: 14 additions & 0 deletions js/test/net/tcp.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

var test = require('tape');
Expand Down
25 changes: 25 additions & 0 deletions js/test/timers/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

var test = require('tape');

test('setTimeout', function(t) {
setTimeout(t.end.bind(t), 0);
});

test('setImmediate', function(t) {
setImmediate(t.end.bind(t), 0);
});
14 changes: 14 additions & 0 deletions js/test/virtio/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2014-2015 runtime.js project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';
var test = require('tape');
var resources = require('../../core/resources');
Expand Down

4 comments on commit 5c967a7

@kesla
Copy link
Member

@kesla kesla commented on 5c967a7 Jun 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, having licenses like this prepended to each file isn't needed, io.js removed them a while back (nodejs/node#311) and I think that we should consider doing the same.

Also, you should've added those license headers in a separate commit so the history gets easier to follow.

@iefserge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kesla are you sure that same works for Apache license?

@kesla
Copy link
Member

@kesla kesla commented on 5c967a7 Jun 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iefserge I'm not a lawyer so I can't really answer whats exactly needed or not 😄. I might read up on the subject a bit more at some point but yeah I guess we can leave it in there right now.

@iefserge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay :)

Please sign in to comment.