-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Reflection.Emitblocking-releasein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtest-enhancementImprovements of test source codeImprovements of test source code
Milestone
Description
Per offline discussions, it was considered useful to add tests for the following cases; some of these tests were already done in an ad-hoc fashion but not committed:
- Test for special characters in member and class names. ECMA-335 doesn't provide rules here, unlike C# for example, but we should check for special characters and strings such as "*", "!", "@", "_", "__", "0x42", "\42" (Unicode escaping), and embedded quotes and nulls. We shouldn't have cases where the input is valid, but the encoding of that fails or is misrepresented.
- Tests for high length counts in member and class names. ECMA-335 doesn't provide rules here, unlike C# for example, but we should verify that long names work as expected.
- Test for class and member name collisions; adding the same property more than once for example.
- Validate ECMA-335 "II.24.2.6 #~ stream" cases when it switches from a 2 byte index to a 4 byte index. There is a bug in the spec (and in .NET) since in one place it says "it is stored using 2 bytes if table i has less than 2^16 rows, otherwise it is stored using 4 bytes" and in section "II.22.37 TypeDef : 0x02" it says we may need "rowcount + 1" which would push the rowcount value from 0xffff to 0x10000 but which would not fit in 2 bytes. See also Compiler can silently generate a bad image when there's 0xFFFF parameters in the module #94892
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Reflection.Emitblocking-releasein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtest-enhancementImprovements of test source codeImprovements of test source code