aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/sanitizers_ut.cpp
blob: e6fd50c9a2d9a1cb797a4e260e2b67107140b331 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "sanitizers.h"
#include "sys_alloc.h"

#include <library/cpp/testing/unittest/registar.h> 

Y_UNIT_TEST_SUITE(Sanitizers) {
    Y_UNIT_TEST(MarkAsIntentionallyLeaked) {
        auto* p1 = new i32[100];
        NSan::MarkAsIntentionallyLeaked(p1);

        auto* p2 = y_allocate(123);
        NSan::MarkAsIntentionallyLeaked(p2);
    }

} // Y_UNIT_TEST_SUITE(Sanitizers)