[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test-[jscocoa] 004 js load

Code

"We use this functionality all the time. Skipping test." self cancelFileIn!

self nativeCodeFollows!
// Load file
	var file = NSBundle.mainBundle.bundlePath + '/Contents/Resources/Tests/Resources/externalFileTest.js'
	JSCocoaController.log(file)
	__jsc__.evalJSFile(file)

	// Test var
	if (externalVariable != 'Hello !')	throw "external variable not found"

	// Test function
	var added = externalFunctionAdder(3, 4)
	if (added != 7)	throw "external function malfunctioned"
	
//	JSCocoaController.log('added=' + added)

References