File: embed_tests.cpp

package info (click to toggle)
simdutf 8.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,524 kB
  • sloc: cpp: 64,498; ansic: 15,347; python: 3,592; sh: 366; makefile: 12
file content (22 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "simdutf.h"

#include <span>

#include <tests/helpers/test.h>

#if __cpp_pp_embed

TEST(test_embed) {
  // clang-format off
  constexpr unsigned char binary[]{
  #embed <embed/valid_utf8.txt>
  };
  // clang-format on
  static_assert(simdutf::validate_utf8(std::span(binary)));
}

#else
TEST(embed_is_not_available_in_older_cpp_versions) {}
#endif

TEST_MAIN