Skip to content

Commit 453c499

Browse files
committed
Reflection tests passing
1 parent 2e30e53 commit 453c499

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

topics/about_reflection.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ $(document).ready(function(){
44
module("About Reflection (topics/about_reflection.js)");
55

66
test("typeof", function() {
7-
equals(typeof({}), __, 'what is the type of an empty object?');
8-
equals(typeof('apple'), __, 'what is the type of a string?');
9-
equals(typeof(-5), __, 'what is the type of -5?');
10-
equals(typeof(false), __, 'what is the type of false?');
7+
equals(typeof({}),"object", 'what is the type of an empty object?');
8+
equals(typeof('apple'), "string", 'what is the type of a string?');
9+
equals(typeof(-5), "number", 'what is the type of -5?');
10+
equals(typeof(false), "boolean", 'what is the type of false?');
1111
});
1212

1313
test("property enumeration", function() {
@@ -18,8 +18,8 @@ $(document).ready(function(){
1818
keys.push(propertyName);
1919
values.push(person[propertyName]);
2020
}
21-
ok(keys.equalTo(['__','__','__']), 'what are the property names of the object?');
22-
ok(values.equalTo(['__',__,__]), 'what are the property values of the object?');
21+
ok(keys.equalTo(['name','age','unemployed']), 'what are the property names of the object?');
22+
ok(values.equalTo(['Amory Blaine',102,true]), 'what are the property values of the object?');
2323
});
2424

2525
test("hasOwnProperty", function() {
@@ -31,22 +31,22 @@ $(document).ready(function(){
3131
for(propertyName in fruits) {
3232
keys.push(propertyName);
3333
}
34-
ok(keys.equalTo(['__', '__', '__']), 'what are the properties of the array?');
34+
ok(keys.equalTo(['0', '1', 'equalTo']), 'what are the properties of the array?');
3535

3636
var ownKeys = [];
3737
for(propertyName in fruits) {
3838
if (fruits.hasOwnProperty(propertyName)) {
3939
ownKeys.push(propertyName);
4040
}
4141
}
42-
ok(ownKeys.equalTo(['__', '__']), 'what are the own properties of the array?');
42+
ok(ownKeys.equalTo(['0', '1']), 'what are the own properties of the array?');
4343
});
4444

4545
test("eval", function() {
4646
// eval executes a string
4747
var result = "";
4848
eval("result = 'apple' + ' ' + 'pie'");
49-
equals(result, __, 'what is the value of result?');
49+
equals(result, 'apple pie', 'what is the value of result?');
5050
});
5151

5252
});

0 commit comments

Comments
 (0)