test: remove smalloc add-on test
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 29 May 2015 12:34:35 +0000 (14:34 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 1 Jun 2015 21:17:52 +0000 (23:17 +0200)
The smalloc module is about to be deprecated and removed.  Remove the
add-on test now so it's not forgotten about in the upcoming purge.

PR-URL: https://github.com/nodejs/io.js/pull/1835
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
test/addons/smalloc-alloc/binding.cc [deleted file]
test/addons/smalloc-alloc/binding.gyp [deleted file]
test/addons/smalloc-alloc/test.js [deleted file]

diff --git a/test/addons/smalloc-alloc/binding.cc b/test/addons/smalloc-alloc/binding.cc
deleted file mode 100644 (file)
index 6efde5d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <node.h>
-#include <smalloc.h>
-#include <v8.h>
-
-using namespace v8;
-
-void Alloc(const FunctionCallbackInfo<Value>& args) {
-  Isolate* isolate = args.GetIsolate();
-  Local<Object> obj = Object::New(isolate);
-  size_t len = args[0]->Uint32Value();
-  node::smalloc::Alloc(isolate, obj, len);
-  args.GetReturnValue().Set(obj);
-}
-
-void Dispose(const FunctionCallbackInfo<Value>& args) {
-  node::smalloc::AllocDispose(args.GetIsolate(), args[0].As<Object>());
-}
-
-void HasExternalData(const FunctionCallbackInfo<Value>& args) {
-  args.GetReturnValue().Set(
-      node::smalloc::HasExternalData(args.GetIsolate(), args[0].As<Object>()));
-}
-
-void init(Handle<Object> target) {
-  NODE_SET_METHOD(target, "alloc", Alloc);
-  NODE_SET_METHOD(target, "dispose", Dispose);
-  NODE_SET_METHOD(target, "hasExternalData", HasExternalData);
-}
-
-NODE_MODULE(binding, init);
diff --git a/test/addons/smalloc-alloc/binding.gyp b/test/addons/smalloc-alloc/binding.gyp
deleted file mode 100644 (file)
index 3bfb844..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  'targets': [
-    {
-      'target_name': 'binding',
-      'sources': [ 'binding.cc' ]
-    }
-  ]
-}
diff --git a/test/addons/smalloc-alloc/test.js b/test/addons/smalloc-alloc/test.js
deleted file mode 100644 (file)
index 76648e0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-var assert = require('assert');
-var binding = require('./build/Release/binding');
-var obj = binding.alloc(16);
-for (var i = 0; i < 16; i++) {
-  assert.ok(typeof obj[i] == 'number');
-}
-assert.ok(binding.hasExternalData(obj));
-binding.dispose(obj);
-assert.ok(typeof obj[0] !== 'number');