Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_memcpy_wrappers_unittest.cpp
Go to the documentation of this file.
1// Copyright 2023 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "core/fxcrt/fx_memcpy_wrappers.h"
6
7#include "testing/gtest/include/gtest/gtest.h"
8
9TEST(fxcrt, FXSYS_memset) {
10 // Test passes if it does not trigger UBSAN warnings.
11 EXPECT_EQ(nullptr, FXSYS_memset(nullptr, 0, 0));
12}
13
14TEST(fxcrt, FXSYS_wmemset) {
15 // Test passes if it does not trigger UBSAN warnings.
16 EXPECT_EQ(nullptr, FXSYS_wmemset(nullptr, 0, 0));
17}
18
19TEST(fxcrt, FXSYS_memcpy) {
20 // Test passes if it does not trigger UBSAN warnings.
21 EXPECT_EQ(nullptr, FXSYS_memcpy(nullptr, nullptr, 0));
22}
23
24TEST(fxcrt, FXSYS_wmemcpy) {
25 // Test passes if it does not trigger UBSAN warnings.
26 EXPECT_EQ(nullptr, FXSYS_wmemcpy(nullptr, nullptr, 0));
27}
28
29TEST(fxcrt, FXSYS_memmove) {
30 // Test passes if it does not trigger UBSAN warnings.
31 EXPECT_EQ(nullptr, FXSYS_memmove(nullptr, nullptr, 0));
32}
33
34TEST(fxcrt, FXSYS_wmemmove) {
35 // Test passes if it does not trigger UBSAN warnings.
36 EXPECT_EQ(nullptr, FXSYS_wmemmove(nullptr, nullptr, 0));
37}
38
39TEST(fxcrt, FXSYS_memcmp) {
40 // Test passes if it does not trigger UBSAN warnings.
41 EXPECT_EQ(0, FXSYS_memcmp(nullptr, nullptr, 0));
42}
43
44TEST(fxcrt, FXSYS_wmemcmp) {
45 // Test passes if it does not trigger UBSAN warnings.
46 EXPECT_EQ(0, FXSYS_wmemcmp(nullptr, nullptr, 0));
47}
48
49TEST(fxcrt, FXSYS_memchr) {
50 // Test passes if it does not trigger UBSAN warnings.
51 EXPECT_EQ(nullptr, FXSYS_memchr(nullptr, 0, 0));
52}
53
54TEST(fxcrt, FXSYS_wmemchr) {
55 // Test passes if it does not trigger UBSAN warnings.
56 EXPECT_EQ(nullptr, FXSYS_wmemchr(nullptr, 0, 0));
57}
TEST(FXCRYPT, CryptToBase16)