source:
proiecte/swift/trunk/include/swift_assert.h
Last change on this file was 176, checked in by , 14 years ago | |
---|---|
File size: 388 bytes |
Line | |
---|---|
1 | /* |
2 | * swift_assert.h |
3 | * |
4 | * (c) 2009 Ionut Rosoiu <ionut.rosoiu@gmail.com> |
5 | * |
6 | */ |
7 | |
8 | #ifndef SWIFT_ASSERT_H_ |
9 | #define SWIFT_ASSERT_H_ |
10 | |
11 | #include <stdio.h> |
12 | |
13 | #define swift_assert(cond) \ |
14 | do { \ |
15 | if (!(cond)) { \ |
16 | printf("Assertion failed: %s:%d\n", __FILE__, __LINE__); \ |
17 | exit(-1); \ |
18 | } \ |
19 | } while(0) |
20 | |
21 | |
22 | #endif /* SWIFT_ASSERT_H_ */ |
Note: See TracBrowser
for help on using the repository browser.