ndebug.cc 744 B

123456789101112131415161718192021222324
  1. // -*- mode: c++; coding: utf-8 -*-
  2. // ra-ra/test - Isolate breakage with -DNDEBUG.
  3. // (c) Daniel Llorens - 2022
  4. // This library is free software; you can redistribute it and/or modify it under
  5. // the terms of the GNU Lesser General Public License as published by the Free
  6. // Software Foundation; either version 3 of the License, or (at your option) any
  7. // later version.
  8. #include <iostream>
  9. #include "ra/test.hh"
  10. int main(int argc, char * * argv)
  11. {
  12. ra::TestRecorder tr;
  13. tr.section("-DNDEBUG breaks at ply_ravel etc. order[rank] vlas when traversing dynamic rank objects [ra40]");
  14. {
  15. int ap[6] = {0, 1, 2, 3, 4, 5};
  16. ra::ViewBig<int> a({6}, ap);
  17. tr.test_eq(ra::ptr(ap), a);
  18. }
  19. return tr.summary();
  20. }