From 102eee767f1a7528a333ae68be1f47937b3383cf Mon Sep 17 00:00:00 2001 From: Sergey Gaychuk Date: Wed, 17 Nov 2010 17:24:14 +0200 Subject: [PATCH] transport: empty test for sqlite converter --- transport/sqlite/test/Makefile.in | 4 ++ transport/sqlite/test/aaConverterTest.js | 51 ++++++++++++++++++++++ .../sqlite/test/aaSqliteTransportTestModule.cpp | 1 + 3 files changed, 56 insertions(+) create mode 100644 transport/sqlite/test/aaConverterTest.js diff --git a/transport/sqlite/test/Makefile.in b/transport/sqlite/test/Makefile.in index f1c2aff..244990c 100644 --- a/transport/sqlite/test/Makefile.in +++ b/transport/sqlite/test/Makefile.in @@ -65,6 +65,10 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../src \ $(NULL) +EXTRA_COMPONENTS = \ + aaConverterTest.js \ + $(NULL) + EXTRA_DEPS = \ ../src/aaSqliteStmt.$(OBJ_SUFFIX) \ ../src/aaSqlitePump.$(OBJ_SUFFIX) \ diff --git a/transport/sqlite/test/aaConverterTest.js b/transport/sqlite/test/aaConverterTest.js new file mode 100644 index 0000000..490efcf --- /dev/null +++ b/transport/sqlite/test/aaConverterTest.js @@ -0,0 +1,51 @@ +/* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=javascript: */ +/* + * Copyright (C) 2010 Sergey Yanovich + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +const nsCI = Components.interfaces; +const moduleName = "aaConverterTest"; +const moduleCID = "{30e4bf20-504a-44fd-9473-3dc0294f4827}"; +const moduleContractID = "@aasii.org/transport/sqlite/test/converter;1"; + +Components.utils.import("resource:///modules/aaTestVC.jsm"); + +/* + * Module entry point + * The NSGetModule function is the magic entry point that XPCOM uses to find + * what XPCOM components this module provides + */ +function NSGetModule(comMgr, fileSpec) +{ + var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] + .getService(Components.interfaces.mozIJSSubScriptLoader); + loader.loadSubScript("resource:///modules/nsTestFrame.jsm"); + + var aaVCTestModule = JSTestModule(); + aaVCTestModule.init = ModuleInit; + aaVCTestModule.init(); + return aaVCTestModule; +} + +function ModuleInit() +{ + this._name = moduleName; + this._CID = Components.ID(moduleCID); + this._contractID = moduleContractID; +} + diff --git a/transport/sqlite/test/aaSqliteTransportTestModule.cpp b/transport/sqlite/test/aaSqliteTransportTestModule.cpp index 8e09f62..f886736 100644 --- a/transport/sqlite/test/aaSqliteTransportTestModule.cpp +++ b/transport/sqlite/test/aaSqliteTransportTestModule.cpp @@ -67,6 +67,7 @@ static const char* subtests[] = { AA_SQLITE_CREATE_TABLE1_CONTRACT ,"@aasii.org/transport/xml/sqlite;1" + ,"@aasii.org/transport/sqlite/test/converter;1" }; #define subtestCount (sizeof(subtests) / sizeof(char*)) -- 2.11.4.GIT