Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define BOOST_TEST_MODULE testmodule
- #include <boost/test/included/unit_test.hpp>
- #include <AL/al.h>
- #include <AL/alc.h>
- /*
- * This program will run fine until the exit. (the test suite will succeed)
- * But at the exit, a currupted double-linked list is detected + backtrace is printed
- */
- /*
- * Compile with:
- * g++ main.cpp -o main -g3 -gdwarf-2 -lboost_unit_test_framework -lopenal
- *
- * Run the not crashintg test with:
- * ./main -t no_crash
- *
- * Run the crashing test(s) with:
- * ./main -t crash
- * ./main -t crash2
- *
- */
- BOOST_AUTO_TEST_CASE(no_crash) {
- ALCdevice *alDevice;
- alDevice = alcOpenDevice(NULL);
- alcCloseDevice(alDevice);
- }
- BOOST_AUTO_TEST_CASE(crash) {
- ALCdevice *alDevice;
- ALCcontext *alContext;
- alDevice = alcOpenDevice(NULL);
- alContext = alcCreateContext(alDevice, nullptr);
- }
- BOOST_AUTO_TEST_CASE(crash2) {
- ALCdevice *alDevice;
- ALCcontext *alContext;
- alDevice = alcOpenDevice(NULL);
- alContext = alcCreateContext(alDevice, nullptr);
- alcDestroyContext(alContext);
- alcCloseDevice(alDevice);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement