Skip to content

Commit

Permalink
Add atexit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kant2002 authored and ForNeVeR committed Aug 17, 2022
1 parent c5d497c commit a79cb4c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Cesium.IntegrationTests/atexit.ignore.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <stdlib.h>
#include <stdio.h>

void f1(void)
{
puts("f1");
}

void f2(void)
{
puts("f2");
}

int main(void)
{
if (!atexit(f1) && !atexit(f2) && !atexit(f2))
return 42;

// atexit registration failed
return -1;
} // <- if registration was successful calls f2, f2, f1

0 comments on commit a79cb4c

Please sign in to comment.