General Purpose library for Freestanding C++ and POSIX systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
527 B

  1. #include <gp/allocator/arena.hpp>
  2. #include <gp/array.hpp>
  3. #include <gp/enveloppe/cbor.hpp>
  4. #include "test_scaffold.h"
  5. struct cbor_test : public test_scaffold {
  6. cbor_test() {
  7. name = __FILE__ ":1";
  8. }
  9. virtual int run() {
  10. gp::array<char, 4096> store;
  11. gp::arena alloc{&*store.begin(), store.size()};
  12. gp::cbor_value data{alloc};
  13. auto gen = data.new_object();
  14. gen.emplace_back(uint8_t(12), int32_t(-98));
  15. gen.emplace_back(uint8_t(13), uint32_t(98));
  16. return 0;
  17. }
  18. };
  19. append_test dummy_pg5zhr8bv(new cbor_test{});