Skip to content

Commit

Permalink
Fixed indenting.
Browse files Browse the repository at this point in the history
  • Loading branch information
etscrivner committed Feb 28, 2010
1 parent ea34997 commit 3e0255c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions examples/factorial_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
//
// Computes the factorial of the given number
int factorial(int n) {
if (n <= 0) return 1;
if (n <= 0) return 1;

int result = 1;
while (n > 1) {
result *= n;
--n;
}
int result = 1;
while (n > 1) {
result *= n;
--n;
}

return result;
return result;
}

int main(int argc, char* argv[]) {
// Setup lemon for 5 tests
lemon::test<> lemon(4);
lemon::test<> lemon(4);

// Test 1: Factorial of zero is one
lemon.is(factorial(0), 1, "0! = 1");
Expand All @@ -40,8 +40,8 @@ int main(int argc, char* argv[]) {
// Test 4: 5! = 120
lemon.is(factorial(5), 120, "5! = 120");

// End testing
lemon.done();
// End testing
lemon.done();

return 0;
}

0 comments on commit 3e0255c

Please sign in to comment.