Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,19 @@ module.exports = function(grunt) {
},
runMetadataGenerator: {
cmd: "./node_modules/.bin/generate-metadata " + localCfg.libsDir + " ./dist/framework/assets/metadata"
}
},
runTests: {
cmd: "npm install && grunt --verbose",
cwd: "./test-app"
},
antCleanBindingGenerator: {
cmd: "ant clean",
cwd: "./binding-generator/Generator/"
},
antCleanRunTime: {
cmd: "ant clean",
cwd: "./src/"
},
}
});

Expand All @@ -206,7 +218,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-replace");

grunt.registerTask("generateRuntime", [
"exec:generateRuntime"
"exec:generateRuntime"
]);

grunt.registerTask("generateMetadata", [
Expand All @@ -230,6 +242,12 @@ module.exports = function(grunt) {
return [];
}
})());

grunt.registerTask("test", [
"exec:antCleanBindingGenerator",
"exec:antCleanRunTime",
"exec:runTests"
]);

grunt.registerTask("default", [
"clean:build",
Expand Down
1 change: 1 addition & 0 deletions test-app/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
Expand Down
2 changes: 1 addition & 1 deletion test-app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" />
android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Expand Down
4 changes: 4 additions & 0 deletions test-app/ant.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
key.store.password=aaaaaa
key.alias.password=aaaaaa
key.store=./custom_sign.keystore
key.alias=aaaa-alias
139 changes: 139 additions & 0 deletions test-app/assets/app/Infrastructure/Jasmine/jasmine-2.0.1/boot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.

If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.

The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.

[jasmine-gem]: http://github.com/pivotal/jasmine-gem
*/

var jasmineRequire = require('./jasmine');
var JUnitXmlReporter = require('../jasmine-reporters/junit_reporter').JUnitXmlReporter;
var TerminalReporter = require('../jasmine-reporters/terminal_reporter').TerminalReporter;

(function() {
/**
* ## Require &amp; Instantiate
*
* Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
*/
var jasmine = jasmineRequire.core(jasmineRequire);

/**
* Create the Jasmine environment. This is used to run all specs in a project.
*/
var env = jasmine.getEnv();

/**
* ## The Global Interface
*
* Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
*/
var jasmineInterface = {
describe: function(description, specDefinitions) {
return env.describe(description, specDefinitions);
},

xdescribe: function(description, specDefinitions) {
return env.xdescribe(description, specDefinitions);
},

it: function(desc, func) {
return env.it(desc, func);
},

xit: function(desc, func) {
return env.xit(desc, func);
},

beforeEach: function(beforeEachFunction) {
return env.beforeEach(beforeEachFunction);
},

afterEach: function(afterEachFunction) {
return env.afterEach(afterEachFunction);
},

expect: function(actual) {
return env.expect(actual);
},

pending: function() {
return env.pending();
},

spyOn: function(obj, methodName) {
return env.spyOn(obj, methodName);
},

jsApiReporter: new jasmine.JsApiReporter({
timer: new jasmine.Timer()
}),

execute: function() {
return env.execute();
},

jasmine: jasmine
};

/**
* Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
*/
if (typeof window == "undefined" && typeof global == "object") {
extend(global, jasmineInterface);
} else {
extend(window, jasmineInterface);
}

/**
* Expose the interface for adding custom equality testers.
*/
jasmine.addCustomEqualityTester = function(tester) {
env.addCustomEqualityTester(tester);
};

/**
* Expose the interface for adding custom expectation matchers
*/
jasmine.addMatchers = function(matchers) {
return env.addMatchers(matchers);
};

/**
* Expose the mock interface for the JavaScript timeout functions
*/
jasmine.clock = function() {
return env.clock;
};

/**
* ## Runner Parameters
*/

env.catchExceptions(true);

/**
* The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
*/
env.addReporter(jasmineInterface.jsApiReporter);
//
env.addReporter(new TerminalReporter({
verbosity: 5
}));

env.addReporter(new JUnitXmlReporter());

env.specFilter = function(spec) {
return true;
};

/**
* Helper function for readability above.
*/
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
}
}());
Loading