summaryrefslogtreecommitdiffstats
path: root/test cases/common/174 ndebug if-release enabled/main.c
blob: 984ebcabe0520f2def79b21beee7cecac783e662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <assert.h>
#include <stdlib.h>

int meson_test_side_effect = EXIT_FAILURE;

int meson_test_set_side_effect(void) {
    meson_test_side_effect = EXIT_SUCCESS;
    return 1;
}

int main(void) {
    // meson_test_side_effect is set only if assert is executed
    assert(meson_test_set_side_effect());
    return meson_test_side_effect;
}