gcc/testsuite/g++.dg/contracts/contracts-multiline1.C
raw| 1 | // { dg-do run } |
| 2 | // { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" } |
| 3 | |
| 4 | int main(int, char **) |
| 5 | { |
| 6 | int x = 5; |
| 7 | int y = 10; |
| 8 | [[ assert: |
| 9 | x |
| 10 | < |
| 11 | 10 |
| 12 | && |
| 13 | y |
| 14 | > |
| 15 | 123 |
| 16 | ]]; |
| 17 | } |
| 18 | |
| 19 | // { dg-skip-if "requires hosted libstdc++ for stdc++exp" { ! hostedlib } } |
| 20 | // { dg-output "contract violation in function main at .*.C:8: x < 10 && y > 123.*(\n|\r\n|\r)" } |