@@ -11,10 +11,10 @@ function B() {
1111B . prototype = new A ( ) ;
1212
1313test ( "typeof" , function ( ) {
14- equal ( __ , typeof ( { } ) , 'what is the type of an empty object?' ) ;
15- equal ( __ , typeof ( 'apple' ) , 'what is the type of a string?' ) ;
16- equal ( __ , typeof ( - 5 ) , 'what is the type of -5?' ) ;
17- equal ( __ , typeof ( false ) , 'what is the type of false?' ) ;
14+ equal ( "object" , typeof ( { } ) , 'what is the type of an empty object?' ) ;
15+ equal ( "string" , typeof ( 'apple' ) , 'what is the type of a string?' ) ;
16+ equal ( "number" , typeof ( - 5 ) , 'what is the type of -5?' ) ;
17+ equal ( "boolean" , typeof ( false ) , 'what is the type of false?' ) ;
1818} ) ;
1919
2020test ( "property enumeration" , function ( ) {
@@ -25,8 +25,8 @@ test("property enumeration", function() {
2525 keys . push ( propertyName ) ;
2626 values . push ( person [ propertyName ] ) ;
2727 }
28- ok ( keys . equalTo ( [ '__ ' , '__ ' , '__ ' ] ) , 'what are the property names of the object?' ) ;
29- ok ( values . equalTo ( [ '__' , __ , __ ] ) , 'what are the property values of the object?' ) ;
28+ ok ( keys . equalTo ( [ 'name ' , 'age ' , 'unemployed ' ] ) , 'what are the property names of the object?' ) ;
29+ ok ( values . equalTo ( [ 'Amory Blaine' , 102 , true ] ) , 'what are the property values of the object?' ) ;
3030} ) ;
3131
3232test ( "hasOwnProperty" , function ( ) {
@@ -37,8 +37,8 @@ test("hasOwnProperty", function() {
3737 for ( propertyName in b ) {
3838 keys . push ( propertyName ) ;
3939 }
40- equal ( __ , keys . length , 'how many elements are in the keys array?' ) ;
41- deepEqual ( [ __ , __ ] , keys , 'what are the properties of the array?' ) ;
40+ equal ( 2 , keys . length , 'how many elements are in the keys array?' ) ;
41+ deepEqual ( [ 'bprop' , 'aprop' ] , keys , 'what are the properties of the array?' ) ;
4242
4343 // hasOwnProperty returns true if the parameter is a property directly on the object,
4444 // but not if it is a property accessible via the prototype chain.
@@ -48,21 +48,21 @@ test("hasOwnProperty", function() {
4848 ownKeys . push ( propertyName ) ;
4949 }
5050 }
51- equal ( __ , ownKeys . length , 'how many elements are in the ownKeys array?' ) ;
52- deepEqual ( [ __ ] , ownKeys , 'what are the own properties of the array?' ) ;
51+ equal ( 1 , ownKeys . length , 'how many elements are in the ownKeys array?' ) ;
52+ deepEqual ( [ 'bprop' ] , ownKeys , 'what are the own properties of the array?' ) ;
5353} ) ;
5454
5555test ( "constructor property" , function ( ) {
5656 var a = new A ( ) ;
5757 var b = new B ( ) ;
58- equal ( __ , typeof ( a . constructor ) , "what is the type of a's constructor?" ) ;
59- equal ( __ , a . constructor . name , "what is the name of a's constructor?" ) ;
60- equal ( __ , b . constructor . name , "what is the name of b's constructor?" ) ;
58+ equal ( "function" , typeof ( a . constructor ) , "what is the type of a's constructor?" ) ;
59+ equal ( "A" , a . constructor . name , "what is the name of a's constructor?" ) ;
60+ equal ( "A" , b . constructor . name , "what is the name of b's constructor?" ) ;
6161} ) ;
6262
6363test ( "eval" , function ( ) {
6464 // eval executes a string
6565 var result = "" ;
6666 eval ( "result = 'apple' + ' ' + 'pie'" ) ;
67- equal ( __ , result , 'what is the value of result?' ) ;
67+ equal ( "apple pie" , result , 'what is the value of result?' ) ;
6868} ) ;
0 commit comments