Commit 4ab5b77
committed
test: Fix selector tests to expect correct code generation
Updated three selector tests that were checking for incorrect behavior:
- TestGenerateSelector: Now expects c.E.Target.Value (was e.Target.Value)
- TestGenerateSelectorSingleField: Now expects c.Obj.Name (was obj.Name)
- TestGenerateSelectorInFunctionCall: Now expects c.Req.User.Name (was req.User.Name)
Parameters are stored as capitalized struct fields and accessed via the
component receiver, so the old expectations were for undefined variables.
The current code generation is correct - these tests now verify the
correct behavior.1 parent 0e1e40b commit 4ab5b77
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
744 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
748 | | - | |
749 | | - | |
| 749 | + | |
| 750 | + | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| |||
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | | - | |
784 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
785 | 787 | | |
786 | 788 | | |
787 | 789 | | |
| |||
815 | 817 | | |
816 | 818 | | |
817 | 819 | | |
818 | | - | |
819 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
820 | 823 | | |
821 | 824 | | |
822 | 825 | | |
| |||
0 commit comments