@@ -3,7 +3,6 @@ import test from 'ava';
3
3
import {
4
4
Remotable ,
5
5
Far ,
6
- Data ,
7
6
getInterfaceOf ,
8
7
makeMarshal ,
9
8
passStyleOf ,
@@ -467,18 +466,13 @@ test('records', t => {
467
466
props [ symNonenumFunc ] = { enumerable : false , value : ( ) => 0 } ;
468
467
} else if ( opt === 'nonenumSymbolGetFunc' ) {
469
468
props [ symNonenumGetFunc ] = { enumerable : false , get : ( ) => ( ) => 0 } ;
470
- } else if ( opt === 'data' ) {
471
- mark = 'data' ;
472
469
} else if ( opt === 'far' ) {
473
470
mark = 'far' ;
474
471
} else {
475
472
throw Error ( `unknown option ${ opt } ` ) ;
476
473
}
477
474
}
478
475
const o = create ( objectPrototype , props ) ;
479
- if ( mark === 'data' ) {
480
- return Data ( o ) ;
481
- }
482
476
if ( mark === 'far' ) {
483
477
return Far ( 'iface' , o ) ;
484
478
}
@@ -492,7 +486,6 @@ test('records', t => {
492
486
const NOACC = / R e c o r d s m u s t n o t c o n t a i n a c c e s s o r s / ;
493
487
const RECENUM = / R e c o r d f i e l d s m u s t b e e n u m e r a b l e / ;
494
488
const NOMETH = / c a n n o t s e r i a l i z e o b j e c t s w i t h n o n - m e t h o d s / ;
495
- const NODATA = / D a t a \( \) c a n o n l y b e a p p l i e d t o o t h e r w i s e p a s s - b y - c o p y r e c o r d s / ;
496
489
497
490
// empty objects
498
491
@@ -506,12 +499,7 @@ test('records', t => {
506
499
// harden({})
507
500
t . deepEqual ( ser ( build ( ) ) , emptyData ) ;
508
501
509
- // Data({key1: 'data'})
510
- // old: not applicable, Data() not yet added
511
- // interim1: pass-by-copy without warning, but Data() is not necessary
512
- // final: not applicable, Data() removed
513
502
const key1Data = { body : JSON . stringify ( { key1 : 'data' } ) , slots : [ ] } ;
514
- t . deepEqual ( ser ( build ( 'enumStringData' , 'data' ) ) , key1Data ) ;
515
503
516
504
// Serialized data should roundtrip properly
517
505
t . deepEqual ( unser ( ser ( harden ( { } ) ) ) , { } ) ;
@@ -521,13 +509,6 @@ test('records', t => {
521
509
t . deepEqual ( ser ( unser ( emptyData ) ) , emptyData ) ;
522
510
t . deepEqual ( ser ( unser ( key1Data ) ) , key1Data ) ;
523
511
524
- // Data({})
525
- // old: not applicable, Data() not yet added
526
- // interim1: pass-by-copy without warning
527
- // interim2: pass-by-copy without warning
528
- // final: not applicable, Data() removed
529
- t . deepEqual ( ser ( build ( 'data' ) ) , emptyData ) ; // interim 1+2
530
-
531
512
// Far('iface', {})
532
513
// all cases: pass-by-ref
533
514
t . deepEqual ( ser ( build ( 'far' ) ) , yesIface ) ;
@@ -556,9 +537,6 @@ test('records', t => {
556
537
t . deepEqual ( ser ( build ( 'nonenumStringFunc' ) ) , noIface ) ;
557
538
t . deepEqual ( ser ( build ( 'nonenumSymbolFunc' ) ) , noIface ) ;
558
539
559
- // Data({ key: data, key: func }) : rejected
560
- shouldThrow ( [ 'data' , 'enumStringData' , 'enumStringFunc' ] , NODATA ) ;
561
-
562
540
// Far('iface', { key: data, key: func }) : rejected
563
541
// (some day this might add auxilliary data, but not now
564
542
shouldThrow ( [ 'far' , 'enumStringData' , 'enumStringFunc' ] , CSO ) ;
0 commit comments