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.

const_buffer.test.cpp 364B

1234567891011121314151617
  1. #include <neo/buffer.test.hpp>
  2. #include <neo/const_buffer.hpp>
  3. #include <iostream>
  4. int main() {
  5. neo::const_buffer buf;
  6. CHECK(buf.size() == 0);
  7. buf = neo::const_buffer("meow");
  8. CHECK(buf.size() == 4);
  9. auto buf2 = buf + 3;
  10. CHECK(buf2.size() == 1);
  11. CHECK(buf2.data()[0] == std::byte('w'));
  12. buf2 += 1;
  13. CHECK(buf2.size() == 0);
  14. }