diff options
Diffstat (limited to 'src/3rdparty/tinycbor/tests/parser')
-rw-r--r-- | src/3rdparty/tinycbor/tests/parser/data.cpp | 5 | ||||
-rw-r--r-- | src/3rdparty/tinycbor/tests/parser/tst_parser.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/3rdparty/tinycbor/tests/parser/data.cpp b/src/3rdparty/tinycbor/tests/parser/data.cpp index 0fe2e22544..c99160ad31 100644 --- a/src/3rdparty/tinycbor/tests/parser/data.cpp +++ b/src/3rdparty/tinycbor/tests/parser/data.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal @@ -28,6 +28,8 @@ Q_DECLARE_METATYPE(CborError) +namespace { + template <size_t N> QByteArray raw(const char (&data)[N]) { return QByteArray::fromRawData(data, N - 1); @@ -605,3 +607,4 @@ void addValidationData(size_t minInvalid = ~size_t(0)) // This test technically tests the dumper, not the parser. QTest::newRow("string-utf8-chunk-split") << raw("\x81\x7f\x61\xc2\x61\xa0\xff") << 0 << CborErrorInvalidUtf8TextString; } +} // namespace diff --git a/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp index b8e51619b8..91a65a00ba 100644 --- a/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp +++ b/src/3rdparty/tinycbor/tests/parser/tst_parser.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2019 Intel Corporation +** Copyright (C) 2021 Intel Corporation ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal |