From 7228f66876de9b453979ee70bdbf271bad6115e8 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 29 May 2015 14:34:35 +0200 Subject: [PATCH] test: remove smalloc add-on test The smalloc is about to be deprecated and removed. Remove the add-on regression test now so it's not forgotten about in the upcoming purge. --- test/addons/smalloc-alloc/binding.cc | 30 --------------------------- test/addons/smalloc-alloc/binding.gyp | 8 ------- test/addons/smalloc-alloc/test.js | 10 --------- 3 files changed, 48 deletions(-) delete mode 100644 test/addons/smalloc-alloc/binding.cc delete mode 100644 test/addons/smalloc-alloc/binding.gyp delete mode 100644 test/addons/smalloc-alloc/test.js diff --git a/test/addons/smalloc-alloc/binding.cc b/test/addons/smalloc-alloc/binding.cc deleted file mode 100644 index 6efde5d6d36e70..00000000000000 --- a/test/addons/smalloc-alloc/binding.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include - -using namespace v8; - -void Alloc(const FunctionCallbackInfo& args) { - Isolate* isolate = args.GetIsolate(); - Local obj = Object::New(isolate); - size_t len = args[0]->Uint32Value(); - node::smalloc::Alloc(isolate, obj, len); - args.GetReturnValue().Set(obj); -} - -void Dispose(const FunctionCallbackInfo& args) { - node::smalloc::AllocDispose(args.GetIsolate(), args[0].As()); -} - -void HasExternalData(const FunctionCallbackInfo& args) { - args.GetReturnValue().Set( - node::smalloc::HasExternalData(args.GetIsolate(), args[0].As())); -} - -void init(Handle 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 index 3bfb84493f3e87..00000000000000 --- a/test/addons/smalloc-alloc/binding.gyp +++ /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 index 76648e04c4ce07..00000000000000 --- a/test/addons/smalloc-alloc/test.js +++ /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');