aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/sanitizers_ut.cpp
blob: 99480202a6b7b26d97e1715501ed341e61575e98 (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)