mbed-os/libraries/tests/mbed/call_before_main/main.cpp

14 lines
228 B
C++
Raw Normal View History

#include "test_env.h"
int called = 0;
extern "C" void mbed_main() {
printf("This should be called before main.\n");
called = 1;
}
int main() {
printf("main() starts now.\n");
notify_completion(called == 1);
}