-
-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
For example, in #398 test instead of default format:
<Test_switch_for_all_integer_types_with_cases_starting_from_0>
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: switch (IL_0041, IL_0047, IL_0077, IL_0053, IL_0059, IL_0065, IL_0071)
IL_0036: br IL_0077
IL_0041: ldc.i4.0
IL_0042: br IL_0078
IL_0047: ldc.i4.1
IL_0048: br IL_0078
IL_0053: ldc.i4.3
IL_0054: br IL_0078
IL_0059: ldc.i4.4
IL_0060: br IL_0078
IL_0065: ldc.i4.5
IL_0066: br IL_0078
IL_0071: ldc.i4.6
IL_0072: br IL_0078
IL_0077: ldc.i4.m1
IL_0078: ret
</Test_switch_for_all_integer_types_with_cases_starting_from_0>
I want an option to output that can be directly used in AssertOpCodes
(possibly including the comments):
fs.AssertOpCodes(
OpCodes.Ldarg_1,
OpCodes.Stloc_0,
OpCodes.Ldloc_0,
OpCodes.Switch, // (IL_0041, IL_0047, IL_0077, IL_0053, IL_0059, IL_0065, IL_0071),
OpCodes.Br,
OpCodes.Ldc_I4_0,
OpCodes.Br,
OpCodes.Ldc_I4_1,
OpCodes.Br,
OpCodes.Ldc_I4_3,
OpCodes.Br,
OpCodes.Ldc_I4_4,
OpCodes.Br,
OpCodes.Ldc_I4_5,
OpCodes.Br,
OpCodes.Ldc_I4_6,
OpCodes.Br,
OpCodes.Ldc_I4_M1,
OpCodes.Ret
);