gen_test_numbers.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef GEN_TEST_NUMBERS_HPP
  2. #define GEN_TEST_NUMBERS_HPP
  3. #include <vector>
  4. /**
  5. @author Frank Michler,,, <frank@pc13365>
  6. */
  7. template<class T>
  8. std::vector<T> getFloatTestNumbers()
  9. {
  10. T mynumbers[] = {1.1,2.2,3.3,4.4,5.5,6.616,2.,77.,29.,42.,66.};
  11. std::vector<T> MyVector(mynumbers, mynumbers + sizeof(mynumbers) / sizeof(T) );
  12. return MyVector;
  13. }
  14. template<class T>
  15. std::vector<T> getFloatTestNumbers2()
  16. {
  17. T mynumbers[] = {3.3, 4.4, 77.44, 99.334, 96.4, 9., 3.1415, 66.};
  18. std::vector<T> MyVector(mynumbers, mynumbers + sizeof(mynumbers) / sizeof(T) );
  19. return MyVector;
  20. }
  21. template<class T>
  22. std::vector<T> getIntTestNumbers()
  23. {
  24. T mynumbers[] = {11, 42, 66, 69, 1976, 2010, 2,-77,29,42,66};
  25. std::vector<T> MyVector(mynumbers, mynumbers + sizeof(mynumbers) / sizeof(T) );
  26. return MyVector;
  27. }
  28. template<class T>
  29. std::vector<T> getCharTestNumbers()
  30. {
  31. T mynumbers[] = {11, 42, 66, 69, 127, -21, 2,-77,29,42,66};
  32. std::vector<T> MyVector(mynumbers, mynumbers + sizeof(mynumbers) / sizeof(T) );
  33. return MyVector;
  34. }
  35. template<class T>
  36. std::vector<T> getIntTestNumbers2()
  37. {
  38. T mynumbers[] = {93, 8492, 9, 7843, 11, 84, 8943, 69, 33};
  39. std::vector<T> MyVector(mynumbers, mynumbers + sizeof(mynumbers) / sizeof(T) );
  40. return MyVector;
  41. }
  42. #endif