Skip to content

Commit

Permalink
Update Aspectator and add one more test case
Browse files Browse the repository at this point in the history
  • Loading branch information
17451k committed Sep 3, 2018
1 parent c5a97a1 commit bb9bc99
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aspectator
3 changes: 3 additions & 0 deletions tests/input/complex.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void test(int a, int b, int c) {
int x = __builtin_mul_overflow (a, b, &c);
}
15 changes: 15 additions & 0 deletions tests/test_complex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import unittest
import utils


class TestComplex(utils.CIFTestCase):
# Test for REALPART_EXPR and IMAGPART_EXPR - only up to instrumentation stage.
# These nodes represent respectively the real and the imaginary parts of complex numbers (their sole argument).
# Compilation stage with "src" back-end require support for these expressions in c-backend.
def test_realpart_expr(self):
self.cif.run(cif_input='input/complex.c', aspect='aspect/empty.aspect', stage='instrumentation')
self.check_cif_status()


if __name__ == '__main__':
unittest.main()

0 comments on commit bb9bc99

Please sign in to comment.