Commit dbea9ca
committed
Add regression tests for compound literal pointers
Four regression tests were added under the “Compound Literals”
section in `tests/driver.sh`
1. `char *s = (char[]){...}` scalar-sum case → returns 200
2. `short *s = (short[]){...}` scalar-sum case → returns 6
3. Ternary returning `int *` with the literal in the false branch when the condition is true → returns 60
4. The same ternary with the condition false, selecting the literal branch → returns 61 parent feddce5 commit dbea9ca
3 files changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4743 | 4743 | | |
4744 | 4744 | | |
4745 | 4745 | | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
4746 | 4776 | | |
4747 | 4777 | | |
4748 | 4778 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments