Content-Length: 637918 | pFad | http://github.com/NativeScript/napi-android/commit/a6376d3cab6f26cbaefc615565b67f02d61640bb

13 minor cleanup · NativeScript/napi-android@a6376d3 · GitHub
Skip to content

Commit a6376d3

Browse files
committed
minor cleanup
1 parent e3fb442 commit a6376d3

File tree

2 files changed

+68
-67
lines changed

2 files changed

+68
-67
lines changed

Diff for: test-app/app/src/main/assets/app/tests/tests.js

+68-65
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ describe("Tests ", function () {
565565

566566
var button = new Button();
567567
var arrayOfObjects = button.getDummyClassAsObjectArray();
568+
568569
var name = arrayOfObjects[0].getName();
569570

570571
expect(name).toEqual("dummy");
@@ -1334,93 +1335,95 @@ describe("Tests ", function () {
13341335
expect(exceptionCaught).toBe(true);
13351336
});
13361337

1337-
it("TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted", function () {
1338+
if (!global.__useHostObjects) {
1339+
it("TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted", function () {
13381340

1339-
__log("TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted");
1341+
__log("TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted");
13401342

1341-
var exceptionCaught = false;
1343+
var exceptionCaught = false;
13421344

1343-
var impl = {
1344-
echo : function(s) {
1345-
return "!!!" + s;
1346-
}
1347-
};
1345+
var impl = {
1346+
echo : function(s) {
1347+
return "!!!" + s;
1348+
}
1349+
};
13481350

1349-
var MyButton = com.tns.tests.Button1.extend("btn1303", impl);
1350-
var btn = new MyButton();
1351+
var MyButton = com.tns.tests.Button1.extend("btn1303", impl);
1352+
var btn = new MyButton();
13511353

1352-
var echo = com.tns.tests.Button1.prototype.echo;
1353-
delete com.tns.tests.Button1.prototype.echo;
1354-
delete impl.echo;
1354+
var echo = com.tns.tests.Button1.prototype.echo;
1355+
delete com.tns.tests.Button1.prototype.echo;
1356+
delete impl.echo;
13551357

1356-
try
1357-
{
1358-
__log("btn=" + btn.triggerEcho("12345"));
1359-
}
1360-
catch (e)
1361-
{
1362-
exceptionCaught = true;
1363-
}
1358+
try
1359+
{
1360+
__log("btn=" + btn.triggerEcho("12345"));
1361+
}
1362+
catch (e)
1363+
{
1364+
exceptionCaught = true;
1365+
}
13641366

1365-
expect(exceptionCaught).toBe(true);
1367+
expect(exceptionCaught).toBe(true);
13661368

1367-
exceptionCaught = false;
1369+
exceptionCaught = false;
13681370

1369-
try
1370-
{
1371-
__log("btn=" + btn.triggerEchoAsObject("123"));
1372-
}
1373-
catch (e)
1374-
{
1375-
exceptionCaught = true;
1376-
}
1371+
try
1372+
{
1373+
__log("btn=" + btn.triggerEchoAsObject("123"));
1374+
}
1375+
catch (e)
1376+
{
1377+
exceptionCaught = true;
1378+
}
13771379

1378-
expect(exceptionCaught).toBe(true);
1380+
expect(exceptionCaught).toBe(true);
13791381

1380-
com.tns.tests.Button1.prototype.echo = echo;
1381-
});
1382+
com.tns.tests.Button1.prototype.echo = echo;
1383+
});
13821384

1383-
it("TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten", function () {
1385+
it("TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten", function () {
13841386

1385-
__log("TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten");
1387+
__log("TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten");
13861388

1387-
var exceptionCaught = false;
1389+
var exceptionCaught = false;
13881390

1389-
var impl = {
1390-
echo : function(s) {
1391-
return "!!!" + s;
1392-
}
1393-
};
1391+
var impl = {
1392+
echo : function(s) {
1393+
return "!!!" + s;
1394+
}
1395+
};
13941396

1395-
var MyButton = com.tns.tests.Button1.extend("btn1344", impl);
1396-
var btn = new MyButton();
1397+
var MyButton = com.tns.tests.Button1.extend("btn1344", impl);
1398+
var btn = new MyButton();
13971399

1398-
impl.echo = ""
1400+
impl.echo = ""
13991401

1400-
try
1401-
{
1402-
__log("btn=" + btn.triggerEcho("123"));
1403-
}
1404-
catch (e)
1405-
{
1406-
exceptionCaught = true;
1407-
}
1402+
try
1403+
{
1404+
__log("btn=" + btn.triggerEcho("123"));
1405+
}
1406+
catch (e)
1407+
{
1408+
exceptionCaught = true;
1409+
}
14081410

1409-
expect(exceptionCaught).toBe(true);
1411+
expect(exceptionCaught).toBe(true);
14101412

1411-
exceptionCaught = false;
1413+
exceptionCaught = false;
14121414

1413-
try
1414-
{
1415-
__log("btn=" + btn.triggerEchoAsObject("123"));
1416-
}
1417-
catch (e)
1418-
{
1419-
exceptionCaught = true;
1420-
}
1415+
try
1416+
{
1417+
__log("btn=" + btn.triggerEchoAsObject("123"));
1418+
}
1419+
catch (e)
1420+
{
1421+
exceptionCaught = true;
1422+
}
14211423

1422-
expect(exceptionCaught).toBe(true);
1423-
});
1424+
expect(exceptionCaught).toBe(true);
1425+
});
1426+
}
14241427

14251428
it("TestThrowJavaScriptExceptionWhenPartiallyImplementedInterfaceIsUsed", function () {
14261429

Diff for: test-app/app/src/main/assets/app/tests/testsForRuntimeBindingGenerator.js

-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ describe("Tests for runtime binding generator", function () {
109109

110110
var interfaces = clazz.getInterfaces();
111111

112-
console.log("{", interfaces);
113-
114112
var expectedInterfaces = ["java.util.jar.Pack200$Packer", "java.util.Formattable", "java.util.Observer", "java.util.jar.Pack200$Unpacker", "com.tns.NativeScriptHashCodeProvider"];
115113

116114
expect(interfaces.length).toBe(5);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/napi-android/commit/a6376d3cab6f26cbaefc615565b67f02d61640bb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy