Skip to content

Commit bb9bc99

Browse files
committed
Update Aspectator and add one more test case
1 parent c5a97a1 commit bb9bc99

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

aspectator

tests/input/complex.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void test(int a, int b, int c) {
2+
int x = __builtin_mul_overflow (a, b, &c);
3+
}

tests/test_complex.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import unittest
2+
import utils
3+
4+
5+
class TestComplex(utils.CIFTestCase):
6+
# Test for REALPART_EXPR and IMAGPART_EXPR - only up to instrumentation stage.
7+
# These nodes represent respectively the real and the imaginary parts of complex numbers (their sole argument).
8+
# Compilation stage with "src" back-end require support for these expressions in c-backend.
9+
def test_realpart_expr(self):
10+
self.cif.run(cif_input='input/complex.c', aspect='aspect/empty.aspect', stage='instrumentation')
11+
self.check_cif_status()
12+
13+
14+
if __name__ == '__main__':
15+
unittest.main()

0 commit comments

Comments
 (0)