int doubleValue(int x) { return x*2; }
- int doubleValue(int x) {
return x<<1;}- return x*2;
- }
Describe(double_value) { It(first_test) { Assert::That(doubleValue(5), Equals(10)); Assert::That(doubleValue(7), Equals(14)); } It(second_test) { Assert::That(doubleValue(1000000), Equals(2000000)); Assert::That(doubleValue(-6), Equals(-12)); Assert::That(doubleValue(-108601284), Equals(-217202568)); } };
// TODO: Replace examples and use TDD by writing your own testsDescribe(sampleTests) {It(shouldBe) {Assert::That(doubleValue(5), Equals(10));Assert::That(doubleValue(6), Equals(12));Assert::That(doubleValue(7), Equals(14));Assert::That(doubleValue(8), Equals(16));- Describe(double_value) {
- It(first_test) {
- Assert::That(doubleValue(5), Equals(10));
- Assert::That(doubleValue(7), Equals(14));
- }
- It(second_test) {
- Assert::That(doubleValue(1000000), Equals(2000000));
- Assert::That(doubleValue(-6), Equals(-12));
- Assert::That(doubleValue(-108601284), Equals(-217202568));
- }
- };