Commit b619761
committed
Add tests for array literal pointer semantics
The tests added cover:
- decay of int[] compound literals to int* during initialization
- passing an int[] literal to a function expecting int*
- pointer-typed ternary expressions involving array literals
- char[] and short[] literal sums to confirm correct pointer behavior
These tests ensure the correctness of the unified decay and pointer semantics introduced in the previous commit.1 parent 28d954b commit b619761
File tree
5 files changed
+56
-4
lines changed- tests
- snapshots
5 files changed
+56
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
736 | 758 | | |
737 | 759 | | |
738 | 760 | | |
| |||
4737 | 4759 | | |
4738 | 4760 | | |
4739 | 4761 | | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
4740 | 4792 | | |
4741 | 4793 | | |
4742 | 4794 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments