Code-Eli  0.3.6
factorial_test_suite.hpp
Go to the documentation of this file.
1 /*********************************************************************************
2 * Copyright (c) 2013 David D. Marshall <ddmarsha@calpoly.edu>
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * David D. Marshall - initial code and implementation
11 ********************************************************************************/
12 
13 #ifndef dm_factorial_test_suite_hpp
14 #define dm_factorial_test_suite_hpp
15 
16 #include <typeinfo> // typeid
17 #include <string> // std::string
18 #include <sstream> // std::stringstream
19 #include <iomanip> // std::setw
20 #include <vector> // std::vector
21 #include <functional> // std::less
22 
24 
25 #include <string>
26 #include <vector>
27 
28 class factorial_test_suite : public Test::Suite
29 {
30  protected:
31  void AddTests()
32  {
34  }
35 
36  public:
38  {
39  // add the tests
40  AddTests();
41  }
43  {
44  }
45 
46  private:
48  {
49  int iv;
50  double dv;
51 
53  TEST_ASSERT(iv==720);
54 
56  TEST_ASSERT(dv==720.0);
57 
59  TEST_ASSERT(iv==479001600);
60 
62  TEST_ASSERT(dv==479001600.0);
63  }
64 };
65 
66 #endif
67 
factorial_test_suite()
Definition: factorial_test_suite.hpp:37
~factorial_test_suite()
Definition: factorial_test_suite.hpp:42
void factorial_test()
Definition: factorial_test_suite.hpp:47
Definition: factorial_test_suite.hpp:28
void AddTests()
Definition: factorial_test_suite.hpp:31
void factorial(data__ &val, natural__ n)
Definition: factorial.hpp:25