@@ -565,6 +565,7 @@ describe("Tests ", function () {
565
565
566
566
var button = new Button ( ) ;
567
567
var arrayOfObjects = button . getDummyClassAsObjectArray ( ) ;
568
+
568
569
var name = arrayOfObjects [ 0 ] . getName ( ) ;
569
570
570
571
expect ( name ) . toEqual ( "dummy" ) ;
@@ -1334,93 +1335,95 @@ describe("Tests ", function () {
1334
1335
expect ( exceptionCaught ) . toBe ( true ) ;
1335
1336
} ) ;
1336
1337
1337
- it ( "TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted" , function ( ) {
1338
+ if ( ! global . __useHostObjects ) {
1339
+ it ( "TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted" , function ( ) {
1338
1340
1339
- __log ( "TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted" ) ;
1341
+ __log ( "TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsDeleted" ) ;
1340
1342
1341
- var exceptionCaught = false ;
1343
+ var exceptionCaught = false ;
1342
1344
1343
- var impl = {
1344
- echo : function ( s ) {
1345
- return "!!!" + s ;
1346
- }
1347
- } ;
1345
+ var impl = {
1346
+ echo : function ( s ) {
1347
+ return "!!!" + s ;
1348
+ }
1349
+ } ;
1348
1350
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 ( ) ;
1351
1353
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 ;
1355
1357
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
+ }
1364
1366
1365
- expect ( exceptionCaught ) . toBe ( true ) ;
1367
+ expect ( exceptionCaught ) . toBe ( true ) ;
1366
1368
1367
- exceptionCaught = false ;
1369
+ exceptionCaught = false ;
1368
1370
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
+ }
1377
1379
1378
- expect ( exceptionCaught ) . toBe ( true ) ;
1380
+ expect ( exceptionCaught ) . toBe ( true ) ;
1379
1381
1380
- com . tns . tests . Button1 . prototype . echo = echo ;
1381
- } ) ;
1382
+ com . tns . tests . Button1 . prototype . echo = echo ;
1383
+ } ) ;
1382
1384
1383
- it ( "TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten" , function ( ) {
1385
+ it ( "TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten" , function ( ) {
1384
1386
1385
- __log ( "TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten" ) ;
1387
+ __log ( "TEST: TestThrowJavaScriptExceptionWhenOverideMethodImplementationIsOverwritten" ) ;
1386
1388
1387
- var exceptionCaught = false ;
1389
+ var exceptionCaught = false ;
1388
1390
1389
- var impl = {
1390
- echo : function ( s ) {
1391
- return "!!!" + s ;
1392
- }
1393
- } ;
1391
+ var impl = {
1392
+ echo : function ( s ) {
1393
+ return "!!!" + s ;
1394
+ }
1395
+ } ;
1394
1396
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 ( ) ;
1397
1399
1398
- impl . echo = ""
1400
+ impl . echo = ""
1399
1401
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
+ }
1408
1410
1409
- expect ( exceptionCaught ) . toBe ( true ) ;
1411
+ expect ( exceptionCaught ) . toBe ( true ) ;
1410
1412
1411
- exceptionCaught = false ;
1413
+ exceptionCaught = false ;
1412
1414
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
+ }
1421
1423
1422
- expect ( exceptionCaught ) . toBe ( true ) ;
1423
- } ) ;
1424
+ expect ( exceptionCaught ) . toBe ( true ) ;
1425
+ } ) ;
1426
+ }
1424
1427
1425
1428
it ( "TestThrowJavaScriptExceptionWhenPartiallyImplementedInterfaceIsUsed" , function ( ) {
1426
1429
0 commit comments