bignumber_test_printers.h 754 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // bignumber_test_printers.h
  3. // bigdecimal
  4. //
  5. // Created by Sam Jaffe on 5/20/18.
  6. //
  7. #pragma once
  8. #include "math/bigdecimal.h"
  9. #include "math/biginteger.h"
  10. #include <iosfwd>
  11. #include <string>
  12. #include <tuple>
  13. struct ArithTuple {
  14. math::bigdecimal lhs, rhs;
  15. std::string expected;
  16. };
  17. struct BigDecPair {
  18. math::bigdecimal lhs, rhs;
  19. };
  20. using BigIntPair = std::tuple<math::biginteger, math::biginteger>;
  21. namespace math {
  22. void PrintTo(math::bigdecimal const & dec, std::ostream * out);
  23. void PrintTo(math::biginteger const & dec, std::ostream * out);
  24. }
  25. void PrintTo(BigDecPair const & tup, std::ostream * out);
  26. void PrintTo(ArithTuple const & tup, std::ostream * out);
  27. namespace std {
  28. void PrintTo(BigIntPair const & tup, std::ostream * out);
  29. }