Skip to content

Commit

Permalink
Reverted files to default state
Browse files Browse the repository at this point in the history
  • Loading branch information
caleywoods committed Apr 12, 2011
1 parent e5d7996 commit 010ba4e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions topics/about_asserts.js
Expand Up @@ -4,15 +4,15 @@ $(document).ready(function(){
module("About Asserts (topics/about_asserts.js)");

test("ok", function() {
ok(true, 'what will satisfy the ok assertion?');
ok(false, 'what will satisfy the ok assertion?');
});

test("not", function() {
not(false, 'what is a false value?');
not(__, 'what is a false value?');
});

test("equals", function() {
equals(1+1, 2, 'what will satisfy the equals assertion?');
equals(1+1, __, 'what will satisfy the equals assertion?');
});

});
4 changes: 2 additions & 2 deletions topics/about_assignment.js
Expand Up @@ -4,13 +4,13 @@ $(document).ready(function(){
module("About Assignment (topics/about_assignment.js)");

test("local variables", function() {
var temp = 1; //Using var sets scope to local, interesting.
var temp = __;
equals(1, temp, "Assign a value to the variable temp");
});

test("global variables", function() {
temp = 1;
equals(temp, window.temp, 'global variables are assigned to the window object');
equals(temp, window.__, 'global variables are assigned to the window object');
});

});
4 changes: 2 additions & 2 deletions topics/about_control_structures.js
Expand Up @@ -28,14 +28,14 @@ $(document).ready(function(){
var result = "";
// for in enumerates the property names of an object
for (property_name in person) {
result += property_name;
result = result + property_name;
};
equals(result, __, 'what is the value of result?');
});

test("ternary operator", function() {
var fruit = true ? "apple" : "orange";
equals(fruit, __, 'what is the value of fruit?');
equals(fruit, "apple", 'what is the value of fruit?');

fruit = false ? "apple" : "orange";
equals(fruit, __, 'now what is the value of fruit?');
Expand Down
10 changes: 5 additions & 5 deletions topics/about_equality.js
Expand Up @@ -4,23 +4,23 @@ $(document).ready(function(){
module("About Equality (topics/about_equality.js)");

test("numeric equality", function() {
equals(3 + 4, 7, 'hmmmm?');
equals(3 + __, 7, 'hmmmm?');
});

test("string equality", function() {
equals("3" + "7", "37", "concatenate the strings");
equals("3" + __, "37", "concatenate the strings");
});

test("equality without type coercion", function() {
ok(3 === 3, 'what is exactly equal to 3?');
ok(3 === __, 'what is exactly equal to 3?');
});

test("equality with type coercion", function() {
ok(3 == "3", 'what string is equal to 3, with type coercion?');
ok(3 == __, 'what string is equal to 3, with type coercion?');
});

test("string literals", function() {
equals("frankenstein", 'frankenstein', "quote types are interchangable, but must match.");
equals("frankenstein", __, "quote types are interchangable, but must match.");
});

});
Expand Down
10 changes: 5 additions & 5 deletions topics/about_truthyness.js
Expand Up @@ -4,23 +4,23 @@ $(document).ready(function(){
module("About Truthyness (topics/about_truthyness.js)");

test("truthyness of positive numbers", function() {
var oneIsTrue = 1 ? true : false; //Why use ternary here? equals(1, true, 'is one true?');
equals(oneIsTrue, true, 'is one true?');
var oneIsTrue = 1 ? true : false;
equals(oneIsTrue, __, 'is one true?');
});

test("truthyness of negative numbers", function() {
var negativeOneIsTrue = -1 ? true : false;
equals(negativeOneIsTrue, true, 'is -1 true?');
equals(negativeOneIsTrue, __, 'is -1 true?');
});

test("truthyness of zero", function() {
var zeroIsTrue = 0 ? true : false;
equals(zeroIsTrue, false, 'is 0 true?');
equals(zeroIsTrue, __, 'is 0 true?');
});

test("truthyness of null", function() {
var nullIsTrue = null ? true : false;
equals(nullIsTrue, false);
equals(nullIsTrue, __);
});

});

0 comments on commit 010ba4e

Please sign in to comment.