@@ -105,9 +105,9 @@ tape( 'the constructor prototype has a read-only `byteLength` property', functio
105105 }
106106} ) ;
107107
108- tape ( 'the constructor returns an instance having a `real` property for getting the real component' , function test ( t ) {
108+ tape ( 'the constructor returns an instance having a property for getting the real component' , function test ( t ) {
109109 var z = new Complex64 ( 5.0 , 3.0 ) ;
110- t . strictEqual ( z . real , 5.0 , 'returns expected value' ) ;
110+ t . strictEqual ( z . re , 5.0 , 'returns expected value' ) ;
111111 t . end ( ) ;
112112} ) ;
113113
@@ -117,13 +117,13 @@ tape( 'the constructor returns an instance which throws an error when attempting
117117 t . end ( ) ;
118118
119119 function foo ( ) {
120- z . real = - 5.0 ;
120+ z . re = - 5.0 ;
121121 }
122122} ) ;
123123
124- tape ( 'the constructor returns an instance having an `imag` property for getting the imaginary component' , function test ( t ) {
124+ tape ( 'the constructor returns an instance having a property for getting the imaginary component' , function test ( t ) {
125125 var z = new Complex64 ( 5.0 , 3.0 ) ;
126- t . strictEqual ( z . imag , 3.0 , 'returns expected value' ) ;
126+ t . strictEqual ( z . im , 3.0 , 'returns expected value' ) ;
127127 t . end ( ) ;
128128} ) ;
129129
@@ -133,15 +133,15 @@ tape( 'the constructor returns an instance which throws an error when attempting
133133 t . end ( ) ;
134134
135135 function foo ( ) {
136- z . imag = - 3.0 ;
136+ z . im = - 3.0 ;
137137 }
138138} ) ;
139139
140140tape ( 'the constructor returns an instance which stores real and imaginary components as single-precision floating-point numbers' , function test ( t ) {
141141 var z = new Complex64 ( 3.14 , - 3.14 ) ;
142142
143- t . strictEqual ( z . real , 3.140000104904175 , 'stores as single-precision' ) ;
144- t . strictEqual ( z . imag , - 3.140000104904175 , 'stores as single-precision' ) ;
143+ t . strictEqual ( z . re , 3.140000104904175 , 'stores as single-precision' ) ;
144+ t . strictEqual ( z . im , - 3.140000104904175 , 'stores as single-precision' ) ;
145145
146146 t . end ( ) ;
147147} ) ;
@@ -165,17 +165,17 @@ tape( 'the constructor returns an instance which supports serializing an instanc
165165 z = new Complex64 ( 5.0 , - 3.0 ) ;
166166 expected = {
167167 'type' : 'Complex64' ,
168- 'real ' : 5.0 ,
169- 'imag ' : - 3.0
168+ 're ' : 5.0 ,
169+ 'im ' : - 3.0
170170 } ;
171171 t . deepEqual ( z . toJSON ( ) , expected , 'returns expected value' ) ;
172172 t . strictEqual ( JSON . stringify ( z ) , JSON . stringify ( expected ) , 'serializes as JSON when called by JSON.stringify()' ) ;
173173
174174 z = new Complex64 ( 5.0 , 3.0 ) ;
175175 expected = {
176176 'type' : 'Complex64' ,
177- 'real ' : 5.0 ,
178- 'imag ' : 3.0
177+ 're ' : 5.0 ,
178+ 'im ' : 3.0
179179 } ;
180180 t . deepEqual ( z . toJSON ( ) , expected , 'returns expected value' ) ;
181181 t . strictEqual ( JSON . stringify ( z ) , JSON . stringify ( expected ) , 'serializes as JSON when called by JSON.stringify()' ) ;
0 commit comments