Skip to content

Commit

Permalink
Window test extension (#307)
Browse files Browse the repository at this point in the history
* Export test extension for Windows

* Enabled integrity extension tests

Co-authored-by: Joshua Wise <JoshuaWise@users.noreply.github.com>
  • Loading branch information
mrawdon and JoshuaWise committed Jan 7, 2020
1 parent 892d714 commit 3dd996e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions deps/test_extension.c
Expand Up @@ -9,6 +9,10 @@ static void TestExtensionFunction(sqlite3_context* pCtx, int nVal, sqlite3_value
sqlite3_result_double(pCtx, (double)nVal);
}

#ifdef _WIN32
__declspec(dllexport)
#endif

int sqlite3_extension_init(sqlite3* db, char** pzErrMsg, const sqlite3_api_routines* pApi) {
SQLITE_EXTENSION_INIT2(pApi)
if (pzErrMsg != 0) *pzErrMsg = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/34.database.load-extension.js
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs');
const path = require('path');
const Database = require('../.');

util.describeUnix('Database#loadExtension()', function () {
describe('Database#loadExtension()', function () {
let filepath;
before(function () {
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node');
Expand Down
2 changes: 1 addition & 1 deletion test/42.integrity.js
Expand Up @@ -167,7 +167,7 @@ describe('integrity checks', function () {
});
});

util.describeUnix('Database#loadExtension()', function () {
describe('Database#loadExtension()', function () {
let filepath;
before(function () {
const releaseFilepath = path.join(__dirname, '..', 'build', 'Release', 'test_extension.node');
Expand Down

0 comments on commit 3dd996e

Please sign in to comment.